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 - ESS Env - Trial License.x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/management/trial_license_complete_tier/fleet_integration·ts - Rules Management - Prebuilt Rules - Prebuilt Rules Management @ess @serverless @skipInServerlessMKI install_prebuilt_rules_from_real_package should install prebuilt rules from the package storage #204812

Closed
kibanamachine opened this issue Dec 18, 2024 · 4 comments · Fixed by #204823
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 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

Error: retry.tryWithRetries reached timeout 120000 ms waiting for 'installPrebuiltRulesFleetPackage'
Error: socket hang up
    at Socket.socketOnEnd (node:_http_client:524:23)
    at Socket.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
    at onFailure (retry_for_success.ts:18:9)
    at retryForSuccess (retry_for_success.ts:85:7)
    at RetryService.tryWithRetries (retry.ts:113:12)
    at installPrebuiltRulesFleetPackage (install_prebuilt_rules_fleet_package.ts:72:22)
    at Context.<anonymous> (fleet_integration.ts:47:7)
    at Object.apply (wrap_function.js:74:16)

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Dec 18, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 18, 2024
@kibanamachine kibanamachine added the Team:Detection Rule Management Security Detection Rule Management Team label Dec 18, 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 Dec 18, 2024
@banderror
Copy link
Contributor

The installPrebuiltRulesFleetPackage implements some retry logic:

export const installPrebuiltRulesFleetPackage = async ({
es,
supertest,
version,
overrideExistingPackage,
retryService,
}: {
es: Client;
supertest: SuperTest.Agent;
version?: string;
overrideExistingPackage: boolean;
retryService: RetryService;
}): Promise<InstallPackageResponse | BulkInstallPackagesResponse> => {
if (version) {
// Install a specific version
const response = await retryService.tryWithRetries<InstallPackageResponse>(
installPrebuiltRulesFleetPackage.name,
async () => {
const testResponse = await supertest
.post(epmRouteService.getInstallPath('security_detection_engine', version))
.set('kbn-xsrf', 'true')
.send({
force: overrideExistingPackage,
})
.expect(200);
expect((testResponse.body as InstallPackageResponse).items).toBeDefined();
expect((testResponse.body as InstallPackageResponse).items.length).toBeGreaterThan(0);
return testResponse.body;
},
{
retryCount: MAX_RETRIES,
timeout: ATTEMPT_TIMEOUT,
}
);
await refreshSavedObjectIndices(es);
return response;

However, the 120s timeout still wasn't enough to mitigate a network issue. The problem was that this 120s timeout applies to the whole function and the function did only 1 attempt. I think we should increase the timeout and make it 120s * 3 attempts.

@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 8.18 candidate labels Dec 18, 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 self-assigned this Dec 18, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 20, 2024
…t package with prebuilt rules (elastic#204823)

**Fixes: elastic#204812

## Summary

This PR increases the total timeout for installing the prebuilt rules
package from the API integration tests from 2 minutes to 6 minutes,
where 6 minutes = 2 minutes * 3 attempts.

Logic before the fix:
- If the first attempt takes more than 2 minutes, it will continue to
run.
- If the first attempt takes less than 2 minutes, there will be a second
one.
- If the first attempt takes more than 2 minutes, there won't be a
second one.

Logic after the fix:
- If the first attempt takes more than 2 minutes, it will continue to
run.
- If the first attempt takes less than 2 minutes, there will be a second
one.
- If the first attempt takes more than 2 minutes but less than 6, there
will be a second one.
- If the first attempt takes more than 6 minutes, there won't be a
second one.

Context:
elastic#204812 (comment)

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

(cherry picked from commit 39091fc)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 20, 2024
…t package with prebuilt rules (elastic#204823)

**Fixes: elastic#204812

## Summary

This PR increases the total timeout for installing the prebuilt rules
package from the API integration tests from 2 minutes to 6 minutes,
where 6 minutes = 2 minutes * 3 attempts.

Logic before the fix:
- If the first attempt takes more than 2 minutes, it will continue to
run.
- If the first attempt takes less than 2 minutes, there will be a second
one.
- If the first attempt takes more than 2 minutes, there won't be a
second one.

Logic after the fix:
- If the first attempt takes more than 2 minutes, it will continue to
run.
- If the first attempt takes less than 2 minutes, there will be a second
one.
- If the first attempt takes more than 2 minutes but less than 6, there
will be a second one.
- If the first attempt takes more than 6 minutes, there won't be a
second one.

Context:
elastic#204812 (comment)

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

(cherry picked from commit 39091fc)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 20, 2024
…t package with prebuilt rules (elastic#204823)

**Fixes: elastic#204812

## Summary

This PR increases the total timeout for installing the prebuilt rules
package from the API integration tests from 2 minutes to 6 minutes,
where 6 minutes = 2 minutes * 3 attempts.

Logic before the fix:
- If the first attempt takes more than 2 minutes, it will continue to
run.
- If the first attempt takes less than 2 minutes, there will be a second
one.
- If the first attempt takes more than 2 minutes, there won't be a
second one.

Logic after the fix:
- If the first attempt takes more than 2 minutes, it will continue to
run.
- If the first attempt takes less than 2 minutes, there will be a second
one.
- If the first attempt takes more than 2 minutes but less than 6, there
will be a second one.
- If the first attempt takes more than 6 minutes, there won't be a
second one.

Context:
elastic#204812 (comment)

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

(cherry picked from commit 39091fc)
kibanamachine added a commit that referenced this issue Dec 20, 2024
…ng Fleet package with prebuilt rules (#204823) (#205047)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Security Solution] Reduce flakiness in functions for installing
Fleet package with prebuilt rules
(#204823)](#204823)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Georgii
Gorbachev","email":"georgii.gorbachev@elastic.co"},"sourceCommit":{"committedDate":"2024-12-20T14:07:17Z","message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v8.16.3","v8.17.1"],"title":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt
rules","number":204823,"url":"https://github.com/elastic/kibana/pull/204823","mergeCommit":{"message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204823","number":204823,"mergeCommit":{"message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
kibanamachine added a commit that referenced this issue Dec 20, 2024
…g Fleet package with prebuilt rules (#204823) (#205048)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Reduce flakiness in functions for installing
Fleet package with prebuilt rules
(#204823)](#204823)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Georgii
Gorbachev","email":"georgii.gorbachev@elastic.co"},"sourceCommit":{"committedDate":"2024-12-20T14:07:17Z","message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v8.16.3","v8.17.1"],"title":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt
rules","number":204823,"url":"https://github.com/elastic/kibana/pull/204823","mergeCommit":{"message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204823","number":204823,"mergeCommit":{"message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
kibanamachine added a commit that referenced this issue Dec 20, 2024
…ng Fleet package with prebuilt rules (#204823) (#205046)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution] Reduce flakiness in functions for installing
Fleet package with prebuilt rules
(#204823)](#204823)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Georgii
Gorbachev","email":"georgii.gorbachev@elastic.co"},"sourceCommit":{"committedDate":"2024-12-20T14:07:17Z","message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v8.16.3","v8.17.1"],"title":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt
rules","number":204823,"url":"https://github.com/elastic/kibana/pull/204823","mergeCommit":{"message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204823","number":204823,"mergeCommit":{"message":"[Security
Solution] Reduce flakiness in functions for installing Fleet package
with prebuilt rules (#204823)\n\n**Fixes:
https://github.com/elastic/kibana/issues/204812**\r\n\r\n##
Summary\r\n\r\nThis PR increases the total timeout for installing the
prebuilt rules\r\npackage from the API integration tests from 2 minutes
to 6 minutes,\r\nwhere 6 minutes = 2 minutes * 3 attempts.\r\n\r\nLogic
before the fix:\r\n- If the first attempt takes more than 2 minutes, it
will continue to\r\nrun.\r\n- If the first attempt takes less than 2
minutes, there will be a second\r\none.\r\n- If the first attempt takes
more than 2 minutes, there won't be a\r\nsecond one.\r\n\r\nLogic after
the fix:\r\n- If the first attempt takes more than 2 minutes, it will
continue to\r\nrun.\r\n- If the first attempt takes less than 2 minutes,
there will be a second\r\none.\r\n- If the first attempt takes more than
2 minutes but less than 6, there\r\nwill be a second one.\r\n- If the
first attempt takes more than 6 minutes, there won't be a\r\nsecond
one.\r\n\r\nContext:\r\nhttps://github.com//issues/204812#issuecomment-2552010657\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"39091fc30ba274f155cb807ef5de4e98bcc1072f"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
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 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
3 participants