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] x-pack spaces/enter_space #135200

Merged
merged 6 commits into from
Jul 12, 2022

Conversation

wayneseymour
Copy link
Member

@wayneseymour wayneseymour commented Jun 27, 2022

Summary

Migrate and drop old archive.
Make the test use the new archive.

@wayneseymour wayneseymour added Team:QA Team label for QA Team test_xpack_functional release_note:skip Skip the PR/issue when compiling release notes v8.4.0 labels Jun 27, 2022
@wayneseymour wayneseymour self-assigned this Jun 27, 2022
@wayneseymour wayneseymour force-pushed the migrations/spaces-enter-space branch from d2300ad to d007e92 Compare July 5, 2022 10:13
@wayneseymour wayneseymour marked this pull request as ready for review July 5, 2022 16:15
@wayneseymour wayneseymour requested a review from a team as a code owner July 5, 2022 16:15
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-qa (Team:QA)

@azasypkin
Copy link
Member

ACK: reviewing...

"defaultRoute": "http://example.com/evil"
},
"coreMigrationVersion": "8.4.0",
"id": "6.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

issue: hmm, this will just create a second config object for Kibana 6.0.0 that won't be used. We need to this id to match the version of the Kibana instance.

It looks like kibanaServer.importExport.load doesn't allow you to dynamically change the id, and we'd need to use kibanaServer.savedObjects instead. Do you think something like this would be possible?

// Assets that config object really exists
const config = await kibanaServer.savedObjects.get({
  id: await kibanaServer.version.get(),
  type: 'config',
});

// Update config object
await kibanaServer.savedObjects.update({
  id: config.id,
  type: config.type,
  attributes: { defaultRoute: 'http://example.com/evil' },
});

Copy link
Member Author

Choose a reason for hiding this comment

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

Shouldn't the tests fail then?

Copy link
Member Author

Choose a reason for hiding this comment

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

@wayneseymour wayneseymour force-pushed the migrations/spaces-enter-space branch from e20fc3b to 370dad8 Compare July 6, 2022 16:26
@wayneseymour wayneseymour force-pushed the migrations/spaces-enter-space branch from 370dad8 to f04b5f5 Compare July 11, 2022 15:22
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @wayneseymour

Copy link
Member

@azasypkin azasypkin 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 one last nit.

@@ -0,0 +1,33 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

nit: I don't think we need this file anymore (file isn't imported in the tests and we update config object directly via Saved Object API)?

@wayneseymour wayneseymour merged commit 97c0588 into elastic:main Jul 12, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 12, 2022
wayneseymour added a commit to wayneseymour/kibana that referenced this pull request Jul 12, 2022
wayneseymour added a commit that referenced this pull request Jul 12, 2022
justinkambic pushed a commit to justinkambic/kibana that referenced this pull request Jul 13, 2022
* [Archive Migration] x-pack spaces/enter_space

* Replace the archive definitions with code.

* Add the malformed url to the kbn archive, thanks to a tip from
Oleg Zasypkin.

* Drop exclusive.

* Use Oleg's suggestion.

* Whoops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:QA Team label for QA Team test_xpack_functional v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants