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] Updates diff outcome logic to return CustomizedValueCanUpdate on scenario -AB #186435

Closed
wants to merge 2 commits into from

Conversation

dplumlee
Copy link
Contributor

@dplumlee dplumlee commented Jun 19, 2024

Summary

Related discussion thread: #184889 (comment)

Changes the diff outcome logic to return CustomizedValueCanUpdate when the base version is missing and the current version and target version are not the same (scenario -AB/-BC).

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@dplumlee dplumlee added release_note:skip Skip the PR/issue when compiling release notes 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 v8.15.0 labels Jun 19, 2024
@dplumlee dplumlee self-assigned this Jun 19, 2024
@jpdjere
Copy link
Contributor

jpdjere commented Jun 19, 2024

Thanks for putting this up Davis. I think we should keep this PR open until:

  • we make a final decision on how we want to deal with this case
  • refactor the /upgrade/review endpoint, changing the hasConflict flag to a conflict enum, with the values NO | SOLVABLE | NON_SOLVABLE . If we go with the "compromise" solution we discussed yesterday, we need to mark the proposal for the scenario _AB to be a SOLVABLE conflict instead of hasConflict: false

@banderror banderror added v8.16.0 and removed v8.15.0 labels Jul 1, 2024
jpdjere added a commit that referenced this pull request Jul 25, 2024
…nd functionality (#187770)

**Resolves: #180153
**Resolves: #188277

## Summary

- Extend the POST /upgrade/_review API endpoint's contract and
functionality
- Changes `has_conflict` property within each rule field's
`ThreeWayDiff` from `boolean` to `enum` with possible values:
    - `NONE`: no conflicts in three way diff
- `SOLVABLE`: conflict detected but was successfully resolved by our
algorithms
- `NON_SOLVABLE`: conflict detected and could not be resolved by our
algorithms.

- Adds `has_base_version` boolean field within each field diff
calculation. Has values:
- true: the base version of the field was found and is either defined or
undefined
    - false: the base version of the field was not found

- The possible values for `has_conflict` for each concrete diff
algorithm are:
    - **single line strings**: `NO`, `NON_SOLVABLE` 
    - **multi line strings**: `NO`, `SOLVABLE`, `NON_SOLVABLE` 
    - **numbers**: `NO`, `NON_SOLVABLE` 
    - **array of scalar values**: `NO`, `SOLVABLE`

- [ ] Adds new logic to handle
#186435 (comment)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
@jpdjere
Copy link
Contributor

jpdjere commented Jul 25, 2024

Implemented in #187770

@jpdjere jpdjere closed this Jul 25, 2024
@dplumlee dplumlee deleted the missing-version-diff-logic branch July 25, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area release_note:skip Skip the PR/issue when compiling release notes 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 this pull request may close these issues.

3 participants