mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.17] [Security Solution] Reduce flakiness in functions for installing 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)](https://github.com/elastic/kibana/pull/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/elastic/kibana/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/elastic/kibana/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/elastic/kibana/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>
This commit is contained in:
parent
1bc10e2d18
commit
2c8e4dd755
2 changed files with 6 additions and 6 deletions
|
@ -13,7 +13,7 @@ import expect from 'expect';
|
|||
import { refreshSavedObjectIndices } from '../../refresh_index';
|
||||
|
||||
const MAX_RETRIES = 2;
|
||||
const ATTEMPT_TIMEOUT = 120000;
|
||||
const TOTAL_TIMEOUT = 6 * 60000; // 6 mins, applies to all attempts (1 + MAX_RETRIES)
|
||||
|
||||
/**
|
||||
* Installs latest available non-prerelease prebuilt rules package `security_detection_engine`.
|
||||
|
@ -46,7 +46,7 @@ export const installPrebuiltRulesPackageViaFleetAPI = async (
|
|||
},
|
||||
{
|
||||
retryCount: MAX_RETRIES,
|
||||
timeout: ATTEMPT_TIMEOUT,
|
||||
timeout: TOTAL_TIMEOUT,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -87,7 +87,7 @@ export const installPrebuiltRulesPackageByVersion = async (
|
|||
},
|
||||
{
|
||||
retryCount: MAX_RETRIES,
|
||||
timeout: ATTEMPT_TIMEOUT,
|
||||
timeout: TOTAL_TIMEOUT,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import expect from 'expect';
|
|||
import { refreshSavedObjectIndices } from '../../refresh_index';
|
||||
|
||||
const MAX_RETRIES = 2;
|
||||
const ATTEMPT_TIMEOUT = 120000;
|
||||
const TOTAL_TIMEOUT = 6 * 60000; // 6 mins, applies to all attempts (1 + MAX_RETRIES)
|
||||
|
||||
/**
|
||||
* Installs the `security_detection_engine` package via fleet API. This will
|
||||
|
@ -60,7 +60,7 @@ export const installPrebuiltRulesFleetPackage = async ({
|
|||
},
|
||||
{
|
||||
retryCount: MAX_RETRIES,
|
||||
timeout: ATTEMPT_TIMEOUT,
|
||||
timeout: TOTAL_TIMEOUT,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -94,7 +94,7 @@ export const installPrebuiltRulesFleetPackage = async ({
|
|||
},
|
||||
{
|
||||
retryCount: MAX_RETRIES,
|
||||
timeout: ATTEMPT_TIMEOUT,
|
||||
timeout: TOTAL_TIMEOUT,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue