-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Reporting/Tests] Improvements for task stability in serverless tests #195841
[Reporting/Tests] Improvements for task stability in serverless tests #195841
Conversation
7a3169d
to
02579c9
Compare
02579c9
to
11351b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvement, I changed test to use cookieHeader for internal API call and left similar question about another service call
x-pack/test_serverless/api_integration/test_suites/common/reporting/management.ts
Outdated
Show resolved
Hide resolved
x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Tim, I left few more questions.
it(`user can delete a report they've created`, async () => { | ||
const response = await supertestWithoutAuth | ||
.delete(`${INTERNAL_ROUTES.JOBS.DELETE_PREFIX}/${reportJob.id}`) | ||
.set(...API_HEADER) | ||
.set(...INTERNAL_HEADER) | ||
.set(cookieCredentials); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one!
98f137c
to
2735259
Compare
2735259
to
8e4ee0f
Compare
@@ -84,7 +89,7 @@ export default ({ getService }: FtrProviderContext) => { | |||
}; | |||
before(async () => { | |||
await loadTimelessData(); | |||
roleAuthc = await svlUserManager.createM2mApiKeyWithRoleScope('admin'); | |||
cookieCredentials = await samlAuth.getM2MApiCookieCredentialsWithRoleScope('admin'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: cookie credentials do not need to be invalidated after the test
await reportingAPI.waitForJobToFinish(path, roleAuthc, internalReqHeader); | ||
response = await supertest.get(path); | ||
await reportingAPI.waitForJobToFinish(path, cookieCredentials, internalReqHeader); | ||
response = await supertestWithoutAuth.get(path).set(cookieCredentials); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was BROKEN since the original PR. The snapshot showed a 404 error. This is now fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh no :( typical for snapshot tests in a hidden file
💚 Build Succeeded
Metrics [docs]
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11500876238 |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
8 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Continuation of #192417. This PR attempts to further improve task stability of the reporting task. The original goals were:
During development of this PR, more issues were discovered:
Testing locally
node scripts/functional_tests.js --config=x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts --grep=Reporting
node scripts/functional_tests.js --config=x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts --grep=CSV
node scripts/functional_tests.js --config=x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts --grep=Reporting