-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add upgrade rule smoke tests #136048
Add upgrade rule smoke tests #136048
Conversation
@elasticmachine merge upstream |
@kobelb can I get a review for this please? |
How is the "Upgrade Rule" being created? I don't see where we load the problematic alerting rule that would cause the rule to fail to run. Also, this test is only checking the last response status. Depending on how the alerting rule is created, this might miss an upgrade failure if the alerting rule didn't have the chance to run yet. |
The loading of the rule is done in separate repository as part of the upgrade setup. It uses the rest API to create it, I will put up that PR and link it here so you can review. I was able to reproduce the bug with the rule I created, however I did not verify the last response in the setup, maybe it is needed there. I will make the updates and let you know. |
@elasticmachine merge upstream |
@kobelb the rule setup is linked to this is PR if you would like to review again. |
Thanks @liza-mae. Is the rule setup done on an old version of Kibana prior to upgrading to a new version and then the smoke tests are done? If so, that relegates my concerns to the fact that this alerting rule might not have had a chance to run prior to the smoke test verifying that the last response status is "OK". This is potentially unlikely, and the only way I can think of detecting that is by comparing the last time it ran prior to the upgrade to post upgrade, or having the smoke test wait for the last response to update. |
@kobelb the setup is done an older version of kibana. I added a rest api call to create the rule and it appeared to work fine with the testing I did on 7.13.x, 7.17.x, 8.2.x, 8.3.x and they all had status Ok except for the bug originating from 8.2.x where it had Error and this test caught it. This was done in local testing, I will need to merge the PR to try it on all the paths in CI though, if there is a concern the rule does not run and I can adjust the setup. In what cases would the rule not run after it is created? |
When I run the API setup, I get this in the UI: I have not seen it be anything other than |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
All tests pass for this feature on main: |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @liza-mae |
* Add upgrade rule smoke tests * Add version check Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit d862f6f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
* Add upgrade rule smoke tests * Add version check Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit d862f6f) Co-authored-by: liza-mae <[email protected]>
Adding an upgrade test for issue #135740.