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 Solution] Narrow down indices to match case descriptions #89592

Merged
merged 28 commits into from
Feb 22, 2021

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented Jan 28, 2021

Summary

This PR is to fix #87793

Before we put the defaultIndex of requests too broad, sometimes make the tests flaky.
Similar problem happens to other tests, so remove redundant index along here in this PR.

I also extend the timeout for each test to 10s to avoid returning partial data. For this users and uncommon_cases, I create two mock data which are smaller than the original ones they used. This should be able to reduce the query time.

@angorayc angorayc requested review from a team as code owners January 28, 2021 16:53
@angorayc angorayc added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.11.1 labels Jan 28, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

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

@angorayc angorayc added the release_note:skip Skip the PR/issue when compiling release notes label Jan 28, 2021
@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

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

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc angorayc self-assigned this Jan 29, 2021
@angorayc angorayc closed this Feb 1, 2021
@angorayc angorayc reopened this Feb 8, 2021
@angorayc
Copy link
Contributor Author

angorayc commented Feb 8, 2021

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

angorayc commented Feb 8, 2021

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

angorayc commented Feb 9, 2021

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

docValueFields: [],
inspect: false,
wait_for_completion_timeout: '10s',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious how we settled on the 10s timeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes the request just takes longer than expected to return. I want to put the timeout long enough to wait until the result comes back so I am able to verify the result.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the test here: https://github.com/elastic/kibana/blob/master/x-pack/test/api_integration/apis/search/search.ts#L18

They use a very long timeout to avoid returning just partial data, so I do the same here.

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc angorayc added v7.12.0 and removed v7.11.1 labels Feb 18, 2021
@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that will do the work!!!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @angorayc

@angorayc angorayc merged commit 2df74a1 into elastic:master Feb 22, 2021
angorayc added a commit to angorayc/kibana that referenced this pull request Feb 22, 2021
…lastic#89592)

* update default index to match with description

* narrow down indices to match case description

* run specific tests

* run only security solution's tests

* debug users integration test

* wait_for_completion_timeout

* run only security_solution

* add back integration tests

* avoid multiple requests

* uncomment tests

* unskip tests

* add smaller mock data for users and uncommon_processes

* put test back

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/test/api_integration/apis/security_solution/users.ts
angorayc added a commit to angorayc/kibana that referenced this pull request Feb 22, 2021
…lastic#89592)

* update default index to match with description

* narrow down indices to match case description

* run specific tests

* run only security solution's tests

* debug users integration test

* wait_for_completion_timeout

* run only security_solution

* add back integration tests

* avoid multiple requests

* uncomment tests

* unskip tests

* add smaller mock data for users and uncommon_processes

* put test back

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/test/api_integration/apis/security_solution/users.ts
angorayc added a commit that referenced this pull request Feb 23, 2021
…ions (#89592) (#92284)

* [Security Solution] Narrow down indices to match case descriptions (#89592)

* update default index to match with description

* narrow down indices to match case description

* run specific tests

* run only security solution's tests

* debug users integration test

* wait_for_completion_timeout

* run only security_solution

* add back integration tests

* avoid multiple requests

* uncomment tests

* unskip tests

* add smaller mock data for users and uncommon_processes

* put test back

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/test/api_integration/apis/security_solution/users.ts

* update mocked users data

* update mocked index

* update mocked index

* update mocked index

* update mock data
angorayc added a commit that referenced this pull request Feb 23, 2021
…ons (#89592) (#92283)

* [Security Solution] Narrow down indices to match case descriptions (#89592)

* update default index to match with description

* narrow down indices to match case description

* run specific tests

* run only security solution's tests

* debug users integration test

* wait_for_completion_timeout

* run only security_solution

* add back integration tests

* avoid multiple requests

* uncomment tests

* unskip tests

* add smaller mock data for users and uncommon_processes

* put test back

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/test/api_integration/apis/security_solution/users.ts

* update mocked users data

* update mocked index

* update mocked index

* update mocked index

* update mock data

* update mock data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.12.0
Projects
None yet
5 participants