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

[DE] - Investigation fields followup #164133

Merged
merged 70 commits into from
Aug 29, 2023

Conversation

yctercero
Copy link
Contributor

@yctercero yctercero commented Aug 17, 2023

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:

t.array(NonEmptyString)

Or, if it should be an object like:

t.intersection([
  t.exact(
    t.type({
      fields: NonEmptyArray(t.string),
    })
  ),
  t.exact(
    t.partial({
      overide: t.boolean,
    })
  ),
]);

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 the investigation_fields always be present in the schema. I feel that if we kept the type of this new field as string[] 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 a NonEmptyArray(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 the fields 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

yctercero and others added 30 commits August 3, 2023 11:35
@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

1 similar comment
@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
securitySolution 12.6MB 12.6MB +817.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @yctercero

@yctercero yctercero merged commit 4f87b43 into elastic:main Aug 29, 2023
@yctercero yctercero deleted the investigation_fields_followup branch August 29, 2023 12:41
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.10 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 164133

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 26, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

6 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 164133 locally

@jbudz jbudz added the backport:skip This commit does not require backporting label Sep 30, 2024
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants