-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Security Solution] [Detections] Replace 'partial failure' with 'warning' for rule statuses #91167
Merged
dhurley14
merged 5 commits into
elastic:master
from
dhurley14:partial-failure-to-warning
Feb 17, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2f6bd37
removes usage of 'partial failure' status and replaces with a 'warnin…
dhurley14 0832d9c
update integration tests from 'partial failure' to 'warning'
dhurley14 e0ae733
fix integration test to warn and not error when no index patterns mat…
dhurley14 bfade53
fix integration test
dhurley14 6d3cb93
removes outdated comments from the create_rules e2e test
dhurley14 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
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
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
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.
Disclaimer: I'm not familiar with Kibana upgrades and migrations, what's supported and not.
What if a user upgrades Kibana from let's say 7.10 (where a rule can have a
partial failure
status) to 8.1? I mean data-wise. Such a rule will (for a short time) have a status which will not be supported in the API anymore (do I understand the intention right?). But still we'll fetch thispartial failure
status, return in the API response, and the client will receive it. And it's ok if this "adapter"-like code will still be here, but if not, we might get something we don't want in the UI.Wouldn't it be simpler to do either of the following:
partial failure
as"warning"
in the UI layer without modifying the contract between the client and serverwarning
status and convert all partial failures to it on the server; and support it on the clientI'm also not sure about the current users of our API endpoints. While this is not a breaking change in terms of response structure, it's a change in behaviour. If some code in userland relies on some checks for
partial failure
, that could be a de-facto breaking change.So in this regards option num 1 looks better to me until 8.0, where we could in fact "rename"
partial failure
towarning
in the API.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.
Considering user-land breaking changes we will have this change reflected in the docs and in the release notes. If a status is 'partial failure' after upgrade it will still be reflected as a 'warning' on the UI so we do take care of option 1.
Option 2 we no longer write 'partial failure' as a status so these statuses will technically be migrated off of 'partial failure' and to 'warning' as the status text on the server side. You bring up a good point though that even with 8.0 allowing breaking changes this code should still be left in there to account for situations like that.
My hope is that by 8.0 we will be completely off of the saved objects used for rule statuses and then this code won't really be relevant anymore.