-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Archive Migration] xpack..reporting-api-integ/reporting-security #112432
[Archive Migration] xpack..reporting-api-integ/reporting-security #112432
Conversation
Found another spot where the es archive for discover is still in use. Use the kbn archive instead.
@elasticmachine merge upstream |
…g-reporting-security
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.
I think this test should unload
in the after method
@@ -42,7 +44,7 @@ export default function ({ getService }: FtrProviderContext) { | |||
|
|||
after('remove index alias', async () => { | |||
await esArchiver.load('test/functional/fixtures/es_archiver/logstash_functional'); | |||
await esArchiver.load('test/functional/fixtures/es_archiver/discover'); | |||
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); |
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.
I think both of these lines should be unload
?
Also, I don't understand what the call to cleanupIndexAlias
does.
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.
Well, they were originally .load()'s: https://github.com/elastic/kibana/blob/master/x-pack/test/reporting_api_integration/reporting_and_security/bwc_existing_indexes.ts#L44
As for the kbn archiver, yes...that should be an unload. Great catch.
For cleanupIndexAlias
, its a Higher Order Function. When it's called, it adds and index alias, and then it returns a fn, that when called, removes the same index alias...that it created.
It's first applied here:
kibana/x-pack/test/reporting_api_integration/reporting_and_security/bwc_existing_indexes.ts
Line 40 in 0f3f0b1
cleanupIndexAlias = await reportingAPI.coerceReportsIntoExistingIndex( |
this is where it creates.
Later on, it's called in the after method, cleaning up what it created, that index.
Anyway, so Ill change the kbn archiver call to be an unload. Same for the logstash call boss?
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.
Yes, please unload logstash_functional as well.
In the parent index file there's 10 tests. 4 of those load logstash_functional. So another option would be to split those 10 tests into 2 describes and manage the load/unload of logstash_functional in the before/after there for those 4 tests. That would save loading it 3 times. But you don't need to do that on this PR unless you want to.
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.
Yeah I'd love to that right after this is merged.
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.
LGTM
@tsullivan thanks mate! |
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.
LGTM - code and Jenkins results reviewed
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…astic#112432) * [Archive Migration] xpack..reporting-api-integ/reporting-security Found another spot where the es archive for discover is still in use. Use the kbn archive instead. * Switch to unload, per cr. * unload logstash Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…12432) (#112620) * [Archive Migration] xpack..reporting-api-integ/reporting-security Found another spot where the es archive for discover is still in use. Use the kbn archive instead. * Switch to unload, per cr. * unload logstash Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Tre <[email protected]>
Found another spot where the es archive
for discover is still in use.
Use the kbn archive instead.
Helps with: #102552
Partially unblocks: #110445