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 ] Fix flake in bundled_prebuilt_rules_package/prerelease_packages.ts API Integration test #169780

Merged
merged 10 commits into from
Oct 30, 2023

Conversation

jpdjere
Copy link
Contributor

@jpdjere jpdjere commented Oct 25, 2023

Fixes: #162192

Summary

Removes flake by explicitly calling the Fleet endpoint to install the latest package, and doing assertions before actually installing the rules.

Previously we were calling directly installPrebuiltRules without having explicitly installed the package before. The old installation endpoint would check that the package was installed before proceeding, but the new install method doesn't. So the explicit installation is required.

Flaky test runs

@jpdjere jpdjere force-pushed the fix-prerelease-packages-flake branch from 40d884d to 335bffa Compare October 25, 2023 11:00
@jpdjere jpdjere self-assigned this Oct 26, 2023
@jpdjere jpdjere 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 v8.12.0 v8.11.1 labels Oct 26, 2023
@jpdjere jpdjere marked this pull request as ready for review October 26, 2023 09:39
@jpdjere jpdjere requested a review from a team as a code owner October 26, 2023 09:39
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@jpdjere jpdjere requested a review from maximpn October 26, 2023 11:10
maximpn

This comment was marked as duplicate.

@jpdjere
Copy link
Contributor Author

jpdjere commented Oct 27, 2023

@maximpn

Refactored this PR to include one additional step to explicitly call the Fleet endpoint to install the latest package, and doing assertions before actually installing the rules.

Previously we were calling directly installPrebuiltRules without having explicitly installed the package before. The old installation endpoint would check that the package was installed before proceeding, but the new install method doesn't. So the explicit installation is required.

I'll run the flaky test runner, but please re-review. Thanks!

@jpdjere jpdjere requested a review from maximpn October 30, 2023 09:40
Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jpdjere could you add detailed description for installPrebuiltRulesPackageViaFleetAPI, installPrebuiltRules and installPrebuiltRulesPackageByVersion? So the difference is clear for any unprepared reader. It's easy to forget what the functions do exactly and I spend some time to remember. For example installPrebuiltRulesPackageViaFleetAPI and installPrebuiltRulesPackageByVersion have the same description Installs prebuilt rules package security_detection_engine by version. and it's so confusing.

@jpdjere jpdjere force-pushed the fix-prerelease-packages-flake branch from ca9f678 to 0e1a232 Compare October 30, 2023 11:30
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jpdjere

@jpdjere jpdjere merged commit d1b7b7f into elastic:main Oct 30, 2023
28 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 30, 2023
…release_packages.ts` API Integration test (elastic#169780)

Fixes: elastic#162192

## Summary

Removes flake by explicitly calling the Fleet endpoint to install the
latest package, and doing assertions before actually installing the
rules.

Previously we were calling directly `installPrebuiltRules` without
having explicitly installed the package before. The old installation
endpoint would check that the package was installed before proceeding,
but the new install method doesn't. So the explicit installation is
required.

## Flaky test runs

-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3721~
-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3730
[CONTROL - NO CHANGES]~
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3773
[After refactor]

(cherry picked from commit d1b7b7f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.11

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

fkanout pushed a commit to fkanout/kibana that referenced this pull request Oct 30, 2023
…release_packages.ts` API Integration test (elastic#169780)

Fixes: elastic#162192

## Summary

Removes flake by explicitly calling the Fleet endpoint to install the
latest package, and doing assertions before actually installing the
rules.

Previously we were calling directly `installPrebuiltRules` without
having explicitly installed the package before. The old installation
endpoint would check that the package was installed before proceeding,
but the new install method doesn't. So the explicit installation is
required.

## Flaky test runs

-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3721~
-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3730
[CONTROL - NO CHANGES]~
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3773
[After refactor]
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Oct 30, 2023
…release_packages.ts` API Integration test (elastic#169780)

Fixes: elastic#162192

## Summary

Removes flake by explicitly calling the Fleet endpoint to install the
latest package, and doing assertions before actually installing the
rules.

Previously we were calling directly `installPrebuiltRules` without
having explicitly installed the package before. The old installation
endpoint would check that the package was installed before proceeding,
but the new install method doesn't. So the explicit installation is
required.

## Flaky test runs

-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3721~
-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3730
[CONTROL - NO CHANGES]~
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3773
[After refactor]
awahab07 pushed a commit to awahab07/kibana that referenced this pull request Oct 31, 2023
…release_packages.ts` API Integration test (elastic#169780)

Fixes: elastic#162192

## Summary

Removes flake by explicitly calling the Fleet endpoint to install the
latest package, and doing assertions before actually installing the
rules.

Previously we were calling directly `installPrebuiltRules` without
having explicitly installed the package before. The old installation
endpoint would check that the package was installed before proceeding,
but the new install method doesn't. So the explicit installation is
required.

## Flaky test runs

-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3721~
-
~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3730
[CONTROL - NO CHANGES]~
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3773
[After refactor]
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 16, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

11 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@maximpn maximpn removed the v8.11.1 label Apr 15, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 169780 locally

@maximpn maximpn added backport:skip This commit does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules 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.12.0
Projects
None yet
5 participants