-
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
[SLOs] Added $state into filters schema !! #202887
Conversation
💚 Build Succeeded
Metrics [docs]Async chunks
|
query: t.record(t.string, t.any), | ||
}), | ||
t.partial({ | ||
$state: t.any, |
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.
Is it going to be the same data that we store in the SLO's instance? Was there an issue when this type was not present?
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.
we don't store this normall anymore from UI. it's just to be backward compatible.
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 don't understand what is that for? Can you open an issue stating the problem that this PR is actually solving please?
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.
Apparently we were allowing excess keys for a while, resulting in some SLOs created with some $state: { store: "appState" }
overhead. Then excess keys become not allowed somewhere in 8.16, which breaks any API using the filterSchema when provided with such $state key.
This part of the API is really just a dump of the UI settings, nothing better we can do here. I don't expect customer to use that directly
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 it would be better to avoid saving $state
in the SLO instance since it is only related to UI. Can we do that by sanitizing the data before passing it to the API? (more info)
Reading your comment again:
we don't store this normall anymore from UI.
Does it mean we have different types for the SLO instance that we save and API calls? I think my main question is how our public API will look like and if this type is used there.
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.
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.
we don't do that anymore, it's just for backward compatability.
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.
Can we add a test for this?
Starting backport for target branches: 8.15, 8.16, 8.17, 8.x https://github.com/elastic/kibana/actions/runs/12176632586 |
## Summary fixes elastic#202999 Added $state into filters schema !! (cherry picked from commit 51e63ee)
## Summary fixes elastic#202999 Added $state into filters schema !! (cherry picked from commit 51e63ee)
## Summary fixes elastic#202999 Added $state into filters schema !! (cherry picked from commit 51e63ee)
## Summary fixes elastic#202999 Added $state into filters schema !! (cherry picked from commit 51e63ee)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.15`: - [[SLOs] Added $state into filters schema !! (#202887)](#202887) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T09:12:48Z","message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"title":"[SLOs] Added $state into filters schema !!","number":202887,"url":"https://github.com/elastic/kibana/pull/202887","mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202887","number":202887,"mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
# Backport This will backport the following commits from `main` to `8.17`: - [[SLOs] Added $state into filters schema !! (#202887)](#202887) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T09:12:48Z","message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"title":"[SLOs] Added $state into filters schema !!","number":202887,"url":"https://github.com/elastic/kibana/pull/202887","mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202887","number":202887,"mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
# Backport This will backport the following commits from `main` to `8.x`: - [[SLOs] Added $state into filters schema !! (#202887)](#202887) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T09:12:48Z","message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"title":"[SLOs] Added $state into filters schema !!","number":202887,"url":"https://github.com/elastic/kibana/pull/202887","mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202887","number":202887,"mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
# Backport This will backport the following commits from `main` to `8.16`: - [[SLOs] Added $state into filters schema !! (#202887)](#202887) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T09:12:48Z","message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"title":"[SLOs] Added $state into filters schema !!","number":202887,"url":"https://github.com/elastic/kibana/pull/202887","mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202887","number":202887,"mergeCommit":{"message":"[SLOs] Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
## Summary fixes elastic#202999 Added $state into filters schema !!
## Summary fixes elastic#202999 Added $state into filters schema !!
## Summary fixes elastic#202999 Added $state into filters schema !!
## Summary fixes elastic#202999 Added $state into filters schema !!
## Summary fixes elastic#202999 Added $state into filters schema !!
## Summary fixes elastic#202999 Added $state into filters schema !!
Summary
fixes #202999
Added $state into filters schema !!