[Security Solution] data_source field diff algorithm test plan#189669
[Security Solution] data_source field diff algorithm test plan#189669dplumlee merged 7 commits intoelastic:mainfrom
data_source field diff algorithm test plan#189669Conversation
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
da35abf to
0c9ec16
Compare
nikitaindik
left a comment
There was a problem hiding this comment.
Thanks @dplumlee! I have taken a look and left a couple comments. Will take a more thorough look tomorrow.
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
| Examples: | ||
| | algorithm | base_version | current_version | target_version | merged_version | | ||
| | data_source | {type: "index_patterns", "index_patterns": ["one", "two", "three"]} | {type: "index_patterns", "index_patterns": ["two", "one", "four"]} | {type: "index_patterns", "index_patterns": ["one", "two", "five"]} | {type: "index_patterns", "index_patterns": ["one", "two", "four", "five"]} | | ||
| | data_source | {type: "data_view", "data_view_id": "A"} | {type: "index_patterns", "index_patterns": ["one", "one", "two", "three"]} | {type: "index_patterns", "index_patterns": ["one", "two", "five"]} | {type: "index_patterns", "index_patterns": ["one", "two", "three", "five"]} | |
There was a problem hiding this comment.
Is this extra "one" in current_version intentional?
There was a problem hiding this comment.
Yeah, it's similar to the scalar array diff algorithm where we test deduplication, etc., in the arrays. The tests aren't as exhaustive for this algorithm since we're reusing a lot of logic for array comparison and merging but it's still a good idea to test a little bit of it
nikitaindik
left a comment
There was a problem hiding this comment.
Finished my review. Added a couple more comments. Please take a look when you can.
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Show resolved
Hide resolved
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
...ution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md
Outdated
Show resolved
Hide resolved
nikitaindik
left a comment
There was a problem hiding this comment.
Thanks for addressing feedback @dplumlee! LGTM now.
|
After that, all good from my side 👍 ✅ |
…gorithm (#189744) ## Summary Completes #187659 Switches `data_source` fields to use the implemented diff algorithm assigned to them in #188874 Adds integration tests in accordance to #189669 for the `upgrade/_review` API endpoint for the `data_source` field diff algorithm. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### 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)
Summary
Related ticket: #187659
Adds test plan for diff algorithm for arrays of scalar values implemented here: #188874
For maintainers