Commit a7361cf
# Backport
This will backport the following commits from `main` to `9.0`:
- [[Console] Fix output for empty response body
(#218104)](#218104)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-14T22:06:14Z","message":"[Console]
Fix output for empty response body (#218104)\n\nFixes
https://github.com/elastic/kibana/issues/217433\n\n## Summary\n\nThis PR
fixes the Console output when the response body is an
empty\nstring.\n\nIn #199975, we
made Console to\ndisplay an `OK` output if the status code is 200 but
response body is\n`null`. Previously,
`POST\n/_cluster/voting_config_exclusions?node_names=node` returned
`null` and\nso the output was correctly set to `OK` but now the response
is an empty\nstring and this case isn't covered correctly. In this PR,
we make sure\nto perform the right check at the right point so that both
`null` and\nempty strings are covered.\n\nThe test that covers this
scenario and had
failures:\nhttps://github.com/elastic/kibana/blob/7092e79157cb8abb229131a1607369324d10969f/src/platform/test/functional/apps/console/_console.ts#L258\n\n\nTo
run the failing test with the new Es
snapshots:\n\n```\nES_SNAPSHOT_MANIFEST=\"https://storage.googleapis.com/kibana-ci-es-snapshots-daily/8.19.0/archives/20250414-022022_f16f4ce6/manifest.json\"
node scripts/functional_tests_server.js --config
./src/platform/test/functional/apps/console/config.ts\n```\n\nand
\n\n```\nES_SNAPSHOT_MANIFEST=\"https://storage.googleapis.com/kibana-ci-es-snapshots-daily/9.1.0/archives/20250414-021844_4ed1a000/manifest.json\"
node scripts/functional_test_runner.js --config
./src/platform/test/functional/apps/console/config.ts --grep=\"Shows OK
when status code is 200 but body is
empty\"\n```","sha":"170651ac78595f6fe8e2ab4924fd5300b8a4f14e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","backport:prev-minor","v9.1.0","v8.19.0"],"title":"[Console]
Fix output for empty response
body","number":218104,"url":"https://github.com/elastic/kibana/pull/218104","mergeCommit":{"message":"[Console]
Fix output for empty response body (#218104)\n\nFixes
https://github.com/elastic/kibana/issues/217433\n\n## Summary\n\nThis PR
fixes the Console output when the response body is an
empty\nstring.\n\nIn #199975, we
made Console to\ndisplay an `OK` output if the status code is 200 but
response body is\n`null`. Previously,
`POST\n/_cluster/voting_config_exclusions?node_names=node` returned
`null` and\nso the output was correctly set to `OK` but now the response
is an empty\nstring and this case isn't covered correctly. In this PR,
we make sure\nto perform the right check at the right point so that both
`null` and\nempty strings are covered.\n\nThe test that covers this
scenario and had
failures:\nhttps://github.com/elastic/kibana/blob/7092e79157cb8abb229131a1607369324d10969f/src/platform/test/functional/apps/console/_console.ts#L258\n\n\nTo
run the failing test with the new Es
snapshots:\n\n```\nES_SNAPSHOT_MANIFEST=\"https://storage.googleapis.com/kibana-ci-es-snapshots-daily/8.19.0/archives/20250414-022022_f16f4ce6/manifest.json\"
node scripts/functional_tests_server.js --config
./src/platform/test/functional/apps/console/config.ts\n```\n\nand
\n\n```\nES_SNAPSHOT_MANIFEST=\"https://storage.googleapis.com/kibana-ci-es-snapshots-daily/9.1.0/archives/20250414-021844_4ed1a000/manifest.json\"
node scripts/functional_test_runner.js --config
./src/platform/test/functional/apps/console/config.ts --grep=\"Shows OK
when status code is 200 but body is
empty\"\n```","sha":"170651ac78595f6fe8e2ab4924fd5300b8a4f14e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218104","number":218104,"mergeCommit":{"message":"[Console]
Fix output for empty response body (#218104)\n\nFixes
https://github.com/elastic/kibana/issues/217433\n\n## Summary\n\nThis PR
fixes the Console output when the response body is an
empty\nstring.\n\nIn #199975, we
made Console to\ndisplay an `OK` output if the status code is 200 but
response body is\n`null`. Previously,
`POST\n/_cluster/voting_config_exclusions?node_names=node` returned
`null` and\nso the output was correctly set to `OK` but now the response
is an empty\nstring and this case isn't covered correctly. In this PR,
we make sure\nto perform the right check at the right point so that both
`null` and\nempty strings are covered.\n\nThe test that covers this
scenario and had
failures:\nhttps://github.com/elastic/kibana/blob/7092e79157cb8abb229131a1607369324d10969f/src/platform/test/functional/apps/console/_console.ts#L258\n\n\nTo
run the failing test with the new Es
snapshots:\n\n```\nES_SNAPSHOT_MANIFEST=\"https://storage.googleapis.com/kibana-ci-es-snapshots-daily/8.19.0/archives/20250414-022022_f16f4ce6/manifest.json\"
node scripts/functional_tests_server.js --config
./src/platform/test/functional/apps/console/config.ts\n```\n\nand
\n\n```\nES_SNAPSHOT_MANIFEST=\"https://storage.googleapis.com/kibana-ci-es-snapshots-daily/9.1.0/archives/20250414-021844_4ed1a000/manifest.json\"
node scripts/functional_test_runner.js --config
./src/platform/test/functional/apps/console/config.ts --grep=\"Shows OK
when status code is 200 but body is
empty\"\n```","sha":"170651ac78595f6fe8e2ab4924fd5300b8a4f14e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
---------
Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
Co-authored-by: Elena Stoeva <elenastoeva99@gmail.com>
1 parent b6bca1b commit a7361cf
1 file changed
Lines changed: 10 additions & 11 deletions
File tree
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
118 | 123 | | |
119 | | - | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| |||
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 165 | + | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 170 | + | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
| |||
0 commit comments