[9.0] [Console] Fix output for empty response body (#218104)#218185
Merged
kibanamachine merged 5 commits intoelastic:9.0from Apr 17, 2025
Merged
[9.0] [Console] Fix output for empty response body (#218104)#218185kibanamachine merged 5 commits intoelastic:9.0from
kibanamachine merged 5 commits intoelastic:9.0from
Conversation
Fixes elastic#217433 ## Summary This PR fixes the Console output when the response body is an empty string. In elastic#199975, we made Console to display an `OK` output if the status code is 200 but response body is `null`. Previously, `POST /_cluster/voting_config_exclusions?node_names=node` returned `null` and so the output was correctly set to `OK` but now the response is an empty string and this case isn't covered correctly. In this PR, we make sure to perform the right check at the right point so that both `null` and empty strings are covered. The test that covers this scenario and had failures: https://github.com/elastic/kibana/blob/7092e79157cb8abb229131a1607369324d10969f/src/platform/test/functional/apps/console/_console.ts#L258 To run the failing test with the new Es snapshots: ``` ES_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 ``` and ``` ES_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" ``` (cherry picked from commit 170651a)
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
cc @ElenaStoeva |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation