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 Solutions] Reduces timeouts from 10 minutes per test down to 2 minutes and changes log.error to log.debug to avoid spamming #125432

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

FrankHassanabad
Copy link
Contributor

@FrankHassanabad FrankHassanabad commented Feb 11, 2022

Summary

Fixes #125319

Reduces timeouts from 10 minutes per test down to 2 minutes and changes log.error to log.debug to avoid spamming

I test this by making a failing test here:

x-pack/test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts

By increasing await waitForSignalsToBePresent(supertest, log, 4, [id]); from 4 to 5....Then I watched the logs and timed it to ensure it doesn't take 2 minutes.

I did this by running the server:

 node scripts/functional_tests_server.js --config test/detection_engine_api_integration/security_and_spaces/config.ts

And then running the client:

 node scripts/functional_test_runner.js --config test/detection_engine_api_integration/security_and_spaces/config.ts --include test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts

If we start to see flake again on the regular build servers we might have to slightly increase this number again. If this doesn't allow failing servers to fully complete we might need to also decrease this number further or we might need to make this more configurable.

Checklist

Delete any items that are not applicable to this PR.

…es one log.error to log.debug to avoid spamming cloud servers
@FrankHassanabad FrankHassanabad requested a review from a team as a code owner February 11, 2022 19:05
@FrankHassanabad FrankHassanabad self-assigned this Feb 11, 2022
@FrankHassanabad FrankHassanabad added release_note:skip Skip the PR/issue when compiling release notes Team:Security Solution Platform Security Solution Platform Team v8.2.0 v8.1.0 v8.0.0 labels Feb 11, 2022
@FrankHassanabad FrankHassanabad added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 11, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

cc @FrankHassanabad

@FrankHassanabad FrankHassanabad merged commit 6d88579 into elastic:main Feb 11, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2022
…es one log.error to log.debug to avoid spamming cloud servers (elastic#125432)

## Summary

Fixes elastic#125319

Reduces timeouts from 10 minutes per test down to 2 minutes and changes log.error to log.debug to avoid spamming

I test this by making a failing test here:
```
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

By increasing `await waitForSignalsToBePresent(supertest, log, 4, [id]);` from `4` to `5`....Then I watched the logs and timed it to ensure it doesn't take 2 minutes.

I did this by running the server:
```sh
 node scripts/functional_tests_server.js --config test/detection_engine_api_integration/security_and_spaces/config.ts
```

And then running the client:
```sh
 node scripts/functional_test_runner.js --config test/detection_engine_api_integration/security_and_spaces/config.ts --include test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

If we start to see flake again on the regular build servers we might have to slightly increase this number again. If this doesn't allow failing servers to fully complete we might need to also decrease this number further or we might need to make this more configurable.

### Checklist

Delete any items that are not applicable to this PR.

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

(cherry picked from commit 6d88579)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2022
…es one log.error to log.debug to avoid spamming cloud servers (elastic#125432)

## Summary

Fixes elastic#125319

Reduces timeouts from 10 minutes per test down to 2 minutes and changes log.error to log.debug to avoid spamming

I test this by making a failing test here:
```
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

By increasing `await waitForSignalsToBePresent(supertest, log, 4, [id]);` from `4` to `5`....Then I watched the logs and timed it to ensure it doesn't take 2 minutes.

I did this by running the server:
```sh
 node scripts/functional_tests_server.js --config test/detection_engine_api_integration/security_and_spaces/config.ts
```

And then running the client:
```sh
 node scripts/functional_test_runner.js --config test/detection_engine_api_integration/security_and_spaces/config.ts --include test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

If we start to see flake again on the regular build servers we might have to slightly increase this number again. If this doesn't allow failing servers to fully complete we might need to also decrease this number further or we might need to make this more configurable.

### Checklist

Delete any items that are not applicable to this PR.

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

(cherry picked from commit 6d88579)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.0
8.1

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 11, 2022
…es one log.error to log.debug to avoid spamming cloud servers (#125432) (#125441)

## Summary

Fixes #125319

Reduces timeouts from 10 minutes per test down to 2 minutes and changes log.error to log.debug to avoid spamming

I test this by making a failing test here:
```
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

By increasing `await waitForSignalsToBePresent(supertest, log, 4, [id]);` from `4` to `5`....Then I watched the logs and timed it to ensure it doesn't take 2 minutes.

I did this by running the server:
```sh
 node scripts/functional_tests_server.js --config test/detection_engine_api_integration/security_and_spaces/config.ts
```

And then running the client:
```sh
 node scripts/functional_test_runner.js --config test/detection_engine_api_integration/security_and_spaces/config.ts --include test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

If we start to see flake again on the regular build servers we might have to slightly increase this number again. If this doesn't allow failing servers to fully complete we might need to also decrease this number further or we might need to make this more configurable.

### Checklist

Delete any items that are not applicable to this PR.

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

(cherry picked from commit 6d88579)

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 11, 2022
…es one log.error to log.debug to avoid spamming cloud servers (#125432) (#125442)

## Summary

Fixes #125319

Reduces timeouts from 10 minutes per test down to 2 minutes and changes log.error to log.debug to avoid spamming

I test this by making a failing test here:
```
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

By increasing `await waitForSignalsToBePresent(supertest, log, 4, [id]);` from `4` to `5`....Then I watched the logs and timed it to ensure it doesn't take 2 minutes.

I did this by running the server:
```sh
 node scripts/functional_tests_server.js --config test/detection_engine_api_integration/security_and_spaces/config.ts
```

And then running the client:
```sh
 node scripts/functional_test_runner.js --config test/detection_engine_api_integration/security_and_spaces/config.ts --include test/detection_engine_api_integration/security_and_spaces/tests/aliases.ts
```

If we start to see flake again on the regular build servers we might have to slightly increase this number again. If this doesn't allow failing servers to fully complete we might need to also decrease this number further or we might need to make this more configurable.

### Checklist

Delete any items that are not applicable to this PR.

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

(cherry picked from commit 6d88579)

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Security Solution Platform Security Solution Platform Team v8.0.1 v8.1.0 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solutions] Detection engine API integration tests fail and do not fail gracefully, CI aborts
4 participants