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

[Security Solution] Extend the POST /upgrade/_review API endpoint's contract and functionality #180153

Closed
Tracked by #174168
jpdjere opened this issue Apr 5, 2024 · 3 comments · Fixed by #187770
Closed
Tracked by #174168
Assignees
Labels
8.16 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.16.0

Comments

@jpdjere
Copy link
Contributor

jpdjere commented Apr 5, 2024

Epics: https://github.com/elastic/security-team/issues/1974 (internal), #174168

Summary

  • Refactor the diff model to implement the terms "solvable conflict" and "non-solvable conflict" in the code, as described in the Concrete field diff algorithms by type section of the RFC.
  • Modify the ThreeWayDiff interface by replacing the has_conflict field with a conflict field which is a enum with the following possible values: NO | SOLVABLE | NON_SOLVABLE.
  • Adjust the frontend diff components to this change.

Background

In general, for all types of fields, we will follow the heuristic:
- if `target` === `base` && `current` !== `base`, we set merge proposal to be the current version, without a conflict
- if `current` === `base` && `target` !== `base`, we set merge proposal to be the target version, without a conflict
- if `base` !== `current` !== `target`: mark the diff as a conflict AND:
- **if conflict is non-solvable**: use the `current` version as the merge proposal
- **if conflict is solvable** use the generated merged version as the merge proposal (possible only in a few types, detailed below - see tables)
Depending on the specific field or type of field we might want to apply a specific merging algorithm when conflicts arise. Let's propose different types.

@jpdjere jpdjere added triage_needed Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area labels Apr 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@banderror banderror changed the title [Security Solution] Refactor the rule's versions diff model [Security Solution] Refactor the rule's versions diff model (DRAFT) Apr 17, 2024
@jpdjere jpdjere changed the title [Security Solution] Refactor the rule's versions diff model (DRAFT) [Security Solution] Extend the POST /upgrade/_review API endpoint's contract and functionality (DRAFT) May 23, 2024
@jpdjere jpdjere changed the title [Security Solution] Extend the POST /upgrade/_review API endpoint's contract and functionality (DRAFT) [Security Solution] Extend the POST /upgrade/_review API endpoint's contract and functionality May 23, 2024
@jpdjere jpdjere self-assigned this Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.16 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.16.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants