-
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
[DE] - Investigation fields followup #164133
[DE] - Investigation fields followup #164133
Conversation
…-ref HEAD~1..HEAD --fix'
…na into custom_highlighted_fields
…-ref HEAD~1..HEAD --fix'
expected head sha didn’t match current head ref. |
@elasticmachine merge upstream |
…kibana into investigation_fields_followup
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @yctercero |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
6 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Please ignore the first 42 commits - they got pulled in from my original PR since I branched off it before it'd been merged to main. Follow up PR to #163235 - fixing types and adding tests.
There had been discussion about whether the new
investigation_fields
should be something like:Or, if it should be an object like:
The argument for making it an object is that when expanding features related to this, we can simply add keys to the object instead of needing to add another top level field. Georgii had also pointed out that it would make the schema more compatible with the
DiffableRule
interface and the rule diff/upgrade algorithm. Seeing as there is already discussion on how this can be expanded in the future, it seemed appropriate to move forward with updating this field type to be an object.The second point that came up during initial PR review was whether this field should be made
defaultable
. This would mean including migration scripts and having theinvestigation_fields
always be present in the schema. I feel that if we kept the type of this new field asstring[]
I would not feel strongly one way or the other about making this a default field. However, in following the same pattern as alert suppression, I feel that the lack of this field in the schema should represent the fact that this value is unset and not in use. I also feel that carrying around an object, however small, when not in use for a completely optional field does not make sense at this time.By making
investigation_fields.fields
be aNonEmptyArray(t.string)
, we know that if the object is present on the schema, fields are specified and in use. We won't ever end up with something where thefields
array is empty, but the other possible future configuration params are still set. I think that makes it clear and easy to work with in the UI and as an API user.Checklist