Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Fix issue where KEEP columns are not applied after Elasticsearch error #205833

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Jan 8, 2025

Summary

This PR fixes an issue where columns are not applied correctly when using the ES|QL KEEP command after an Elasticsearch error has occurred.

Fixes #205353.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@davismcphee davismcphee added release_note:fix v9.0.0 Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. backport:version Backport to applied version labels v8.17.0 v8.18.0 labels Jan 8, 2025
@davismcphee davismcphee self-assigned this Jan 8, 2025
Comment on lines -65 to -66
});
await this.retry.try(async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing while running my functional test because it tries to modify the Monaco editor after a refresh before it's initialized. I updated it to retry the whole update instead of just the check, and ran the FTR to be sure.

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7666

[✅] test/functional/apps/discover/esql/config.ts: 50/50 tests passed.

see run history

@davismcphee davismcphee marked this pull request as ready for review January 8, 2025 04:23
@davismcphee davismcphee requested review from a team as code owners January 8, 2025 04:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #55 / Observability AI Assistant API tests knowledge_base/knowledge_base_user_instructions.spec.ts Knowledge base user instructions when a user instruction exists and a conversation is created does not add the instruction conversation for other users

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 785.0KB 785.0KB +72.0B

cc @davismcphee

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested locally , and now works as expected when initially, there's an ES error. Thx for fixing it so quickly 🏎️ 👍

@davismcphee davismcphee merged commit 8eb326d into elastic:main Jan 8, 2025
21 checks passed
@davismcphee davismcphee deleted the fix-esql-error-recovery branch January 8, 2025 18:20
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12676651020

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- Sustainable Kibana Architecture: Move CodeEditor related packages #205587 (#205738)

Manual backport

To create the backport manually run:

node scripts/backport --pr 205833

Questions ?

Please refer to the Backport tool documentation

@davismcphee
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x
8.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

davismcphee added a commit to davismcphee/kibana that referenced this pull request Jan 8, 2025
…icsearch error (elastic#205833)

## Summary

This PR fixes an issue where columns are not applied correctly when
using the ES|QL `KEEP` command after an Elasticsearch error has
occurred.

Fixes elastic#205353.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 8eb326d)

# Conflicts:
#	src/plugins/discover/public/application/main/hooks/use_esql_mode.ts
#	test/functional/services/monaco_editor.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:fix Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataDiscovery] Discover Displays “Summary” Column Instead of Expected Columns After Elasticsearch Error
5 participants