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

Failing test: Rules Management - Prebuilt Rules Management Integration Tests - Serverless Env - Complete License.x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/management/trial_license_complete_tier/bootstrap_prebuilt_rules·ts - Rules Management - Prebuilt Rules - Prebuilt Rules Management @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules should skip installing fleet packages if they are already installed #202037

Closed
kibanamachine opened this issue Nov 27, 2024 · 4 comments · Fixed by #205106
Assignees
Labels
8.18 candidate failed-test A test failure on a tracked branch, potentially flaky-test Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area legit-flake Test was triaged and marked as an actual flake. 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.

Comments

@kibanamachine
Copy link
Contributor

A test failed on a tracked branch

JestAssertionError: expect(received).toMatchObject(expected)

- Expected  - 4
+ Received  + 6

  Object {
-   "packages": ArrayContaining [
-     ObjectContaining {
+   "packages": Array [
+     Object {
        "name": "security_detection_engine",
-       "status": "already_installed",
+       "status": "installed",
+       "version": "8.16.2",
      },
-     ObjectContaining {
+     Object {
        "name": "endpoint",
        "status": "already_installed",
+       "version": "8.17.0",
      },
    ],
  }
    at Context.<anonymous> (bootstrap_prebuilt_rules.ts:50:20)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.apply (wrap_function.js:74:16) {
  matcherResult: {
    message: '\x1B[2mexpect(\x1B[22m\x1B[31mreceived\x1B[39m\x1B[2m).\x1B[22mtoMatchObject\x1B[2m(\x1B[22m\x1B[32mexpected\x1B[39m\x1B[2m)\x1B[22m\n' +
      '\n' +
      '\x1B[32m- Expected  - 4\x1B[39m\n' +
      '\x1B[31m+ Received  + 6\x1B[39m\n' +
      '\n' +
      '\x1B[2m  Object {\x1B[22m\n' +
      '\x1B[32m-   "packages": ArrayContaining [\x1B[39m\n' +
      '\x1B[32m-     ObjectContaining {\x1B[39m\n' +
      '\x1B[31m+   "packages": Array [\x1B[39m\n' +
      '\x1B[31m+     Object {\x1B[39m\n' +
      '\x1B[2m        "name": "security_detection_engine",\x1B[22m\n' +
      '\x1B[32m-       "status": "already_installed",\x1B[39m\n' +
      '\x1B[31m+       "status": "installed",\x1B[39m\n' +
      '\x1B[31m+       "version": "8.16.2",\x1B[39m\n' +
      '\x1B[2m      },\x1B[22m\n' +
      '\x1B[32m-     ObjectContaining {\x1B[39m\n' +
      '\x1B[31m+     Object {\x1B[39m\n' +
      '\x1B[2m        "name": "endpoint",\x1B[22m\n' +
      '\x1B[2m        "status": "already_installed",\x1B[22m\n' +
      '\x1B[31m+       "version": "8.17.0",\x1B[39m\n' +
      '\x1B[2m      },\x1B[22m\n' +
      '\x1B[2m    ],\x1B[22m\n' +
      '\x1B[2m  }\x1B[22m',
    pass: false
  }
}

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Nov 27, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 27, 2024
@kibanamachine kibanamachine added the Team:Detection Rule Management Security Detection Rule Management Team label Nov 27, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 27, 2024
@banderror banderror added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area labels Dec 5, 2024
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@banderror banderror added the legit-flake Test was triaged and marked as an actual flake. label Dec 5, 2024
@banderror
Copy link
Contributor

@xcrzx Looks like a legit flake.

@banderror banderror self-assigned this Dec 23, 2024
banderror added a commit to banderror/kibana that referenced this issue Dec 24, 2024
…point (elastic#205106)

**Fixes: elastic#197108
**Fixes: elastic#202037
**Fixes: elastic#203632

## Summary

Builds on top of elastic#203799 and:

- simplifies the package deletion code (1 [API
call](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)
instead of 2, per package)
- adds retry logic
- refactors the testing utils a bit

Flaky test runs:

-
[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)
- 190 runs
-
[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)
- 100 runs

## Details

Here's how the test logs look like:

```
 info Starting tests

 └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management
   └-> "before all" hook: beforeTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"
   └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules
     └-> "before all" hook: beforeTestSuite.trigger for "should install fleet packages required for detection engine to function"
     └-> should install fleet packages required for detection engine to function
       └-> "before each" hook: global before each for "should install fleet packages required for detection engine to function"
       └-> "before each" hook for "should install fleet packages required for detection engine to function"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'security_detection_engine is not installed'
         │      }
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'endpoint is not installed'
         │      }
       └- ✓ pass  (21.6s)
     └-> should skip installing fleet packages if they are already installed
       └-> "before each" hook: global before each for "should skip installing fleet packages if they are already installed"
       └-> "before each" hook for "should skip installing fleet packages if they are already installed"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was installed)
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was installed)
       └- ✓ pass  (22.4s)
     └-> "after all" hook: afterTestSuite.trigger for "should skip installing fleet packages if they are already installed"
   └-> "after all" hook: afterTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"

2 passing (1.0m)
```

### Checklist

- [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

(cherry picked from commit 71144ed)

# Conflicts:
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts
banderror added a commit to banderror/kibana that referenced this issue Dec 24, 2024
…point (elastic#205106)

**Fixes: elastic#197108
**Fixes: elastic#202037
**Fixes: elastic#203632

## Summary

Builds on top of elastic#203799 and:

- simplifies the package deletion code (1 [API
call](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)
instead of 2, per package)
- adds retry logic
- refactors the testing utils a bit

Flaky test runs:

-
[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)
- 190 runs
-
[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)
- 100 runs

## Details

Here's how the test logs look like:

```
 info Starting tests

 └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management
   └-> "before all" hook: beforeTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"
   └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules
     └-> "before all" hook: beforeTestSuite.trigger for "should install fleet packages required for detection engine to function"
     └-> should install fleet packages required for detection engine to function
       └-> "before each" hook: global before each for "should install fleet packages required for detection engine to function"
       └-> "before each" hook for "should install fleet packages required for detection engine to function"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'security_detection_engine is not installed'
         │      }
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'endpoint is not installed'
         │      }
       └- ✓ pass  (21.6s)
     └-> should skip installing fleet packages if they are already installed
       └-> "before each" hook: global before each for "should skip installing fleet packages if they are already installed"
       └-> "before each" hook for "should skip installing fleet packages if they are already installed"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was installed)
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was installed)
       └- ✓ pass  (22.4s)
     └-> "after all" hook: afterTestSuite.trigger for "should skip installing fleet packages if they are already installed"
   └-> "after all" hook: afterTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"

2 passing (1.0m)
```

### Checklist

- [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

(cherry picked from commit 71144ed)

# Conflicts:
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/management/trial_license_complete_tier/bootstrap_prebuilt_rules.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts
banderror added a commit to banderror/kibana that referenced this issue Dec 24, 2024
…point (elastic#205106)

**Fixes: elastic#197108
**Fixes: elastic#202037
**Fixes: elastic#203632

## Summary

Builds on top of elastic#203799 and:

- simplifies the package deletion code (1 [API
call](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)
instead of 2, per package)
- adds retry logic
- refactors the testing utils a bit

Flaky test runs:

-
[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)
- 190 runs
-
[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)
- 100 runs

## Details

Here's how the test logs look like:

```
 info Starting tests

 └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management
   └-> "before all" hook: beforeTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"
   └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules
     └-> "before all" hook: beforeTestSuite.trigger for "should install fleet packages required for detection engine to function"
     └-> should install fleet packages required for detection engine to function
       └-> "before each" hook: global before each for "should install fleet packages required for detection engine to function"
       └-> "before each" hook for "should install fleet packages required for detection engine to function"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'security_detection_engine is not installed'
         │      }
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'endpoint is not installed'
         │      }
       └- ✓ pass  (21.6s)
     └-> should skip installing fleet packages if they are already installed
       └-> "before each" hook: global before each for "should skip installing fleet packages if they are already installed"
       └-> "before each" hook for "should skip installing fleet packages if they are already installed"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was installed)
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was installed)
       └- ✓ pass  (22.4s)
     └-> "after all" hook: afterTestSuite.trigger for "should skip installing fleet packages if they are already installed"
   └-> "after all" hook: afterTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"

2 passing (1.0m)
```

### Checklist

- [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

(cherry picked from commit 71144ed)

# Conflicts:
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts
stratoula pushed a commit to stratoula/kibana that referenced this issue Jan 2, 2025
…point (elastic#205106)

**Fixes: elastic#197108
**Fixes: elastic#202037
**Fixes: elastic#203632

## Summary

Builds on top of elastic#203799 and:

- simplifies the package deletion code (1 [API
call](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)
instead of 2, per package)
- adds retry logic
- refactors the testing utils a bit

Flaky test runs:

-
[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)
- 190 runs
-
[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)
- 100 runs

## Details

Here's how the test logs look like:

```
 info Starting tests

 └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management
   └-> "before all" hook: beforeTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"
   └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules
     └-> "before all" hook: beforeTestSuite.trigger for "should install fleet packages required for detection engine to function"
     └-> should install fleet packages required for detection engine to function
       └-> "before each" hook: global before each for "should install fleet packages required for detection engine to function"
       └-> "before each" hook for "should install fleet packages required for detection engine to function"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'security_detection_engine is not installed'
         │      }
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'endpoint is not installed'
         │      }
       └- ✓ pass  (21.6s)
     └-> should skip installing fleet packages if they are already installed
       └-> "before each" hook: global before each for "should skip installing fleet packages if they are already installed"
       └-> "before each" hook for "should skip installing fleet packages if they are already installed"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was installed)
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was installed)
       └- ✓ pass  (22.4s)
     └-> "after all" hook: afterTestSuite.trigger for "should skip installing fleet packages if they are already installed"
   └-> "after all" hook: afterTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"

2 passing (1.0m)
```

### Checklist

- [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
benakansara pushed a commit to benakansara/kibana that referenced this issue Jan 2, 2025
…point (elastic#205106)

**Fixes: elastic#197108
**Fixes: elastic#202037
**Fixes: elastic#203632

## Summary

Builds on top of elastic#203799 and:

- simplifies the package deletion code (1 [API
call](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)
instead of 2, per package)
- adds retry logic
- refactors the testing utils a bit

Flaky test runs:

-
[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)
- 190 runs
-
[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)
- 100 runs

## Details

Here's how the test logs look like:

```
 info Starting tests

 └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management
   └-> "before all" hook: beforeTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"
   └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules
     └-> "before all" hook: beforeTestSuite.trigger for "should install fleet packages required for detection engine to function"
     └-> should install fleet packages required for detection engine to function
       └-> "before each" hook: global before each for "should install fleet packages required for detection engine to function"
       └-> "before each" hook for "should install fleet packages required for detection engine to function"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'security_detection_engine is not installed'
         │      }
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'endpoint is not installed'
         │      }
       └- ✓ pass  (21.6s)
     └-> should skip installing fleet packages if they are already installed
       └-> "before each" hook: global before each for "should skip installing fleet packages if they are already installed"
       └-> "before each" hook for "should skip installing fleet packages if they are already installed"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was installed)
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was installed)
       └- ✓ pass  (22.4s)
     └-> "after all" hook: afterTestSuite.trigger for "should skip installing fleet packages if they are already installed"
   └-> "after all" hook: afterTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"

2 passing (1.0m)
```

### Checklist

- [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.18 candidate failed-test A test failure on a tracked branch, potentially flaky-test Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area legit-flake Test was triaged and marked as an actual flake. 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants