[9.0] [Detection Engine] Prevent test data from rolling outside of Cypress rules' query (#220923)#221437
Merged
rylnd merged 4 commits intoelastic:9.0from Jun 2, 2025
Merged
Conversation
…rules' query (elastic#220923) ## Summary Our tests rely on static test data, and our cypress suite was running rules with a large lookback (50000h) against them. Recently, tests have begun failing because we've exceeded 50000h since the data's `@timestamp`. This PR updates the cypress rules to use a fixed `from` field wherever possible, in order to "fix" that query window's starting point, ensuring that this issue does not recur. This is already how our integration tests are creating similar rules, so as an added bonus we're now more consistent across test suites, as well. This unskips and thus resolves the following issues: * elastic#201334 * elastic#220822 * elastic#207913 * elastic#199905 Note that there may be more instances of skipped tests that were failing due to this issue (with e.g. data with an earlier date than the `2019-09-02` here); the above tests were just the most obvious and most recent (within the last week). ### Flaky Runner * Detection Engine Cypress (x150): https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8291 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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 (cherry picked from commit 1f6777c) # Conflicts: # x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts # x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule.cy.ts
1 task
Contributor
Author
|
This backport is failing due to the |
Conflicts: x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule.cy.ts
Contributor
Author
|
Okay, this should go green now that #221991 is into |
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @rylnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation