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

[Archive Migration][Partial] discover apps-management #110444

Merged

Conversation

wayneseymour
Copy link
Member

@wayneseymour wayneseymour commented Aug 30, 2021

Comes from #102827

Helps with #108503

Only include the changes under the
test/functional/apps/management folder.

Also, had to clean the index pattern within a previous test
to prevent duplicates

@wayneseymour wayneseymour added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.16.0 v8.0.0 labels Aug 30, 2021
@wayneseymour wayneseymour force-pushed the archive-migration/discover-partial-apps-management branch from a07f3c1 to 05c1277 Compare August 30, 2021 15:21
Comes from #102827

Helps with #108503

Only include the changes under the
test/functional/apps/management folder.
@wayneseymour wayneseymour force-pushed the archive-migration/discover-partial-apps-management branch from 05c1277 to b80083b Compare September 8, 2021 10:21
creates.

Add a sleep to see if there's a race.
@wayneseymour wayneseymour marked this pull request as ready for review September 9, 2021 09:28
@wayneseymour wayneseymour requested a review from LeeDr September 9, 2021 09:28
Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

A few minor changes.

await kibanaServer.uiSettings.replace({});
});

after(async function afterAll() {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
await PageObjects.settings.navigateTo();
await esArchiver.emptyKibanaIndex();
Copy link

Choose a reason for hiding this comment

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

Is await esArchiver.emptyKibanaIndex(); just a wrapper for esArchiver.load('emptyKibana') ?
Or an esArchiver.unload()?
If so, I don't think it should be necessary. And we really want to avoid using the esArchiver.unload() on the .kibana index.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not totally sure about the differences, but esArchiver.load('emptyKibana') loads this obj:

{
  "type": "doc",
  "value": {
    "id": "config:6.0.0-alpha1",
    "index": ".kibana",
    "source": {
      "config": {
        "buildNum": 8467,
        "dateFormat:tz": "UTC"
      },
      "type": "config"
    }
  }
}

and await esArchiver.emptyKibanaIndex() looks like this:

export async function emptyKibanaIndexAction({
  client,
  log,
  kbnClient,
}: {
  client: KibanaClient;
  log: ToolingLog;
  kbnClient: KbnClient;
}) {
  const stats = createStats('emptyKibanaIndex', log);

  await cleanKibanaIndices({ client, stats, log });
  await migrateKibanaIndex(kbnClient);
  stats.createdIndex('.kibana');
  return stats.toJSON();
}

Looks like the latter is more involved.

// delete .kibana index and then wait for Kibana to re-create it
await kibanaServer.uiSettings.replace({});
await kibanaServer.uiSettings.update({});
});

after(async function afterAll() {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.removeLogstashIndexPatternIfExist();
Copy link

Choose a reason for hiding this comment

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

I don't think we need these last 3 statements. The logstash index pattern should be loaded by the kibanaServer.importExport.load and should be removed by the kibanaServer.importExport.unload so I think this is just wasting time.

test/functional/apps/management/_scripted_fields.js Outdated Show resolved Hide resolved
since there's only one test.

Add so cleanup, per CR.
drop these three cleanup lines
as the unload should handle it.
Should not need this.
@wayneseymour
Copy link
Member Author

@elasticmachine merge upstream

@wayneseymour
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@wayneseymour wayneseymour requested a review from LeeDr September 14, 2021 09:04
@@ -125,7 +122,7 @@ export default function ({ getService, getPageObjects }) {
'painless',
'number',
null,
'1',
'100',
Copy link

Choose a reason for hiding this comment

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

I think this change was just to help test if the scripted field existing but was down below the view of the field list. But it doesn't really matter if you change it back or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I remember rapping with you about that. It was like "visibility" or something.
I'll leave it for now, but I'm glad we've this comment here, for posterity.

Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

LGTM - just code review and Jenkins results.

@wayneseymour wayneseymour merged commit 50eb5d9 into master Sep 15, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 15, 2021
* [Archive Migration][Partial] discover apps-management

Comes from elastic#102827

Helps with elastic#108503

Only include the changes under the
test/functional/apps/management folder.

* Remove the index pattern, that the test
creates.

* Drop beforeEach(), in favour of before(),
since there's only one test.

* Drop outdated comment,
drop these three cleanup lines
as the unload should handle it.

* Just keep one cleanup.

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Sep 15, 2021
)

* [Archive Migration][Partial] discover apps-management

Comes from #102827

Helps with #108503

Only include the changes under the
test/functional/apps/management folder.

* Remove the index pattern, that the test
creates.

* Drop beforeEach(), in favour of before(),
since there's only one test.

* Drop outdated comment,
drop these three cleanup lines
as the unload should handle it.

* Just keep one cleanup.

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Tre <[email protected]>
@spalger spalger deleted the archive-migration/discover-partial-apps-management branch May 8, 2022 22:04
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 v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants