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

[9.0] Set from & to as optional args in @kbn/grouping (#213212) #213265

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

## Summary

Set `from` and `to` as optional args in `getGroupingQuery`, a function
exposed by `@kbn/grouping`.

It will unblock this PR:
- elastic#212955

### Motivation

`getGroupingQuery` returns an ES aggregation for grouping documents.
This function assumes data will be queried in a certain interval of
time. However, Asset Inventory needs to query data from the beginning of
time because the UI will not provide any time-range filter. So in order
to reuse this logic, we need to set both args as optional.

Reason for wrapping both fields in an optional `timeRange` record is to
have either both present or both undefined, not only one of them
present.

### 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)
- [x] 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
- [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)

### Risks

No risk at all. It would be a breaking change otherwise, if we had to
require args that were optional before.

(cherry picked from commit af147b5)
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 5, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

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
cloudSecurityPosture 486.1KB 486.2KB +42.0B
securitySolution 8.8MB 8.8MB +30.0B
total +72.0B

History

cc @albertoblaz

@kibanamachine kibanamachine merged commit ab49592 into elastic:9.0 Mar 5, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants