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 - Update Prebuilt Rules Integration Tests - ESS Env - Trial License.x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/update_prebuilt_rules_package/trial_license_complete_tier/update_prebuilt_rules_package·ts - Rules Management - Prebuilt Rules - Update Prebuilt Rules Package @ess @serverless @skipInQA update_prebuilt_rules_package should allow user to install prebuilt rules from scratch, then install new rules and upgrade existing rules from the new package #179210

Closed
Tracked by #176909
kibanamachine opened this issue Mar 22, 2024 · 4 comments
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules 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 'installPrebuiltRulesPackageByVersion'
Error: socket hang up
    at connResetException (node:internal/errors:787:14)
    at Socket.socketOnEnd (node:_http_client:519:23)
    at Socket.emit (node:events:530:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
    at onFailure (retry_for_success.ts:17:9)
    at retryForSuccess (retry_for_success.ts:84:7)
    at RetryService.tryWithRetries (retry.ts:112:12)
    at installPrebuiltRulesPackageByVersion (install_fleet_package_by_url.ts:73:25)
    at Context.<anonymous> (update_prebuilt_rules_package.ts:106:46)
    at Object.apply (wrap_function.js:73:16)

First failure: CI Build - main

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

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

@elasticmachine
Copy link
Contributor

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

@banderror
Copy link
Contributor

This doesn't look like a legit flake caused by the test itself. Likely it's a sporadic network error. The installPrebuiltRulesPackageByVersion function that's failed looks fine:

export const installPrebuiltRulesPackageByVersion = async (
es: Client,
supertest: SuperTest.SuperTest<SuperTest.Test>,
version: string,
retryService: RetryService
): Promise<InstallPackageResponse> => {
const fleetResponse = await retryService.tryWithRetries<InstallPackageResponse>(
installPrebuiltRulesPackageByVersion.name,
async () => {
const testResponse = await supertest
.post(epmRouteService.getInstallPath('security_detection_engine', version))
.set('kbn-xsrf', 'xxxx')
.set('elastic-api-version', '2023-10-31')
.type('application/json')
.send({ force: true })
.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 fleetResponse as InstallPackageResponse;
};

I'll add this ticket to our backlog but close it for now. If the failure reoccurs, we'll investigate it.

@banderror banderror closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules 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

No branches or pull requests

3 participants