-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML][ES|QL] Adds query guardrails and technical preview badge to ES|QL data visualizer #200325
Conversation
38b4b35
to
0a07a39
Compare
0a07a39
to
61406f5
Compare
/ci |
if (filter.bool && Array.isArray(filter.bool?.must_not)) { | ||
filter.bool.must_not.push({ | ||
term: { | ||
_tier: 'data_frozen', | ||
}, | ||
}); | ||
} else { | ||
filter.bool = { | ||
must_not: [ | ||
{ | ||
term: { _tier: 'data_frozen' }, | ||
}, | ||
], | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a bool
object already exists containing a must
but not must_not
this will hit the else
clause where a new bool object is created, wiping out the exiting must
.
I think a series of ifs might be safer. something like
if (filter.bool === undefined) {
filter.bool = Object.create(null);
}
if (filter.bool.must_not === undefined) {
filter.bool.must_not = [];
}
filter.bool.must_not.push({
term: { _tier: 'data_frozen' },
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here 83ff92c
(#200325)
Pinging @elastic/ml-ui (:ml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Starting backport for target branches: 8.x |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
cc @qn895 |
…L data visualizer (elastic#200325) ## Summary Adds extra guardrails to the searches, plus the technical preview badge, to the ES|QL data visualizer. \ The extra safety guards applied are: - Lowers the limit of # of rows sampled to 5000 - Changes the pagination to 10 by default, and only allows 10 to 25 rows visible concurrently - Hides distribution charts by default - Always have frozen tier excluded in the queries <img width="1164" alt="Screenshot 2024-11-16 at 18 26 20" src="https://github.com/user-attachments/assets/a558fdfa-189a-4ba9-b038-8d14df4594be"> https://github.com/user-attachments/assets/488f44dd-4a3c-48c7-8416-5091b614edfd ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] 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/packages/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 - [ ] [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. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_node:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... (cherry picked from commit 94aaed3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…o ES|QL data visualizer (#200325) (#200677) # Backport This will backport the following commits from `main` to `8.x`: - [[ML][ES|QL] Adds query guardrails and technical preview badge to ES|QL data visualizer (#200325)](#200325) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Quynh Nguyen (Quinn)","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-19T08:11:46Z","message":"[ML][ES|QL] Adds query guardrails and technical preview badge to ES|QL data visualizer (#200325)\n\n## Summary\r\n\r\nAdds extra guardrails to the searches, plus the technical preview badge,\r\nto the ES|QL data visualizer. \\\r\n\r\nThe extra safety guards applied are:\r\n- Lowers the limit of # of rows sampled to 5000\r\n- Changes the pagination to 10 by default, and only allows 10 to 25 rows\r\nvisible concurrently\r\n- Hides distribution charts by default\r\n- Always have frozen tier excluded in the queries\r\n\r\n<img width=\"1164\" alt=\"Screenshot 2024-11-16 at 18 26 20\"\r\nsrc=\"https://github.com/user-attachments/assets/a558fdfa-189a-4ba9-b038-8d14df4594be\">\r\n\r\n\r\nhttps://github.com/user-attachments/assets/488f44dd-4a3c-48c7-8416-5091b614edfd\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_node:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...","sha":"94aaed3b139b0bdeeb581954053871d75c098a4a","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:File and Index Data Viz","v9.0.0","backport:version","v8.17.0"],"title":"[ML][ES|QL] Adds query guardrails and technical preview badge to ES|QL data visualizer","number":200325,"url":"https://github.com/elastic/kibana/pull/200325","mergeCommit":{"message":"[ML][ES|QL] Adds query guardrails and technical preview badge to ES|QL data visualizer (#200325)\n\n## Summary\r\n\r\nAdds extra guardrails to the searches, plus the technical preview badge,\r\nto the ES|QL data visualizer. \\\r\n\r\nThe extra safety guards applied are:\r\n- Lowers the limit of # of rows sampled to 5000\r\n- Changes the pagination to 10 by default, and only allows 10 to 25 rows\r\nvisible concurrently\r\n- Hides distribution charts by default\r\n- Always have frozen tier excluded in the queries\r\n\r\n<img width=\"1164\" alt=\"Screenshot 2024-11-16 at 18 26 20\"\r\nsrc=\"https://github.com/user-attachments/assets/a558fdfa-189a-4ba9-b038-8d14df4594be\">\r\n\r\n\r\nhttps://github.com/user-attachments/assets/488f44dd-4a3c-48c7-8416-5091b614edfd\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_node:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...","sha":"94aaed3b139b0bdeeb581954053871d75c098a4a"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200325","number":200325,"mergeCommit":{"message":"[ML][ES|QL] Adds query guardrails and technical preview badge to ES|QL data visualizer (#200325)\n\n## Summary\r\n\r\nAdds extra guardrails to the searches, plus the technical preview badge,\r\nto the ES|QL data visualizer. \\\r\n\r\nThe extra safety guards applied are:\r\n- Lowers the limit of # of rows sampled to 5000\r\n- Changes the pagination to 10 by default, and only allows 10 to 25 rows\r\nvisible concurrently\r\n- Hides distribution charts by default\r\n- Always have frozen tier excluded in the queries\r\n\r\n<img width=\"1164\" alt=\"Screenshot 2024-11-16 at 18 26 20\"\r\nsrc=\"https://github.com/user-attachments/assets/a558fdfa-189a-4ba9-b038-8d14df4594be\">\r\n\r\n\r\nhttps://github.com/user-attachments/assets/488f44dd-4a3c-48c7-8416-5091b614edfd\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_node:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...","sha":"94aaed3b139b0bdeeb581954053871d75c098a4a"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Quynh Nguyen (Quinn) <[email protected]>
…L data visualizer (elastic#200325) ## Summary Adds extra guardrails to the searches, plus the technical preview badge, to the ES|QL data visualizer. \ The extra safety guards applied are: - Lowers the limit of # of rows sampled to 5000 - Changes the pagination to 10 by default, and only allows 10 to 25 rows visible concurrently - Hides distribution charts by default - Always have frozen tier excluded in the queries <img width="1164" alt="Screenshot 2024-11-16 at 18 26 20" src="https://github.com/user-attachments/assets/a558fdfa-189a-4ba9-b038-8d14df4594be"> https://github.com/user-attachments/assets/488f44dd-4a3c-48c7-8416-5091b614edfd ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] 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/packages/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 - [ ] [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. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_node:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ...
Summary
Adds extra guardrails to the searches, plus the technical preview badge, to the ES|QL data visualizer. \
The extra safety guards applied are:
Screen.Recording.2024-11-16.at.17.42.54.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_node:*
label is applied per the guidelinesIdentify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.