-
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
Use groupBy when groupings is not populated correctly #189672
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0cbfa07
Use groupBy when groupings is not populated correctly
kdelemme 5e637fe
Generate instanceId from groupings without reordering fields
kdelemme c7e4a8e
Merge branch 'main' into slo/preview-groupby
kdelemme 8f37b9f
update test snaps
kdelemme 48dec39
Handle empty array
kdelemme 1401b79
Merge branch 'main' into slo/preview-groupby
kdelemme f626edb
Merge branch 'main' into slo/preview-groupby
kdelemme 7633a6c
Merge branch 'main' into slo/preview-groupby
kdelemme 4cee9ac
Merge branch 'main' into slo/preview-groupby
kdelemme 7bd7bc0
Merge branch 'main' into slo/preview-groupby
shahzad31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
53 changes: 12 additions & 41 deletions
53
.../plugins/observability_solution/slo/server/services/__snapshots__/create_slo.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
53 changes: 12 additions & 41 deletions
53
...k/plugins/observability_solution/slo/server/services/__snapshots__/reset_slo.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
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.
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.
Hum... when the
slo.instanceId
is created, we sort the values to keep them stable. It's not guaranteed that the first value will match the first field.kibana/x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_pipeline_template.ts
Line 75 in 0be8295
I wonder if we shouldn't change the ingest pipeline to ensure the first value matches first field, the second value matches the second field, and so on... To do this, we could simplify the ingest pipeline by getting rid of the painless script and replace it with:
This would ensure that first value in the
slo.instanceId
would map back to the first field in the group by list. Since this quirk only affects SLOs who's data stopped reporting and were multi-group-by-values (probably a small subset of our users), it would work for most everyone else. Anyone who had a multi-group-byslo.instanceId
that had an issue could use the_reset
command to get the new ingest pipeline and things would start working as expected.Thoughts?
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.
I think that's a good approach. I like the simplification. We probably need to handle the case where groupBy is
*
but otherwise looks good to meThere 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.
I came up with this 2 processors to handle no groupings. Local testing seems to work fine without group, with 1 and many groups