Fix sharing saved objects phase 2 CI#89056
Merged
jportner merged 2 commits intoelastic:masterfrom Jan 22, 2021
Merged
Conversation
This is required for CI runs when the Kibana version is a snapshot.
jportner
commented
Jan 22, 2021
| minimumConvertVersion = DEFAULT_MINIMUM_CONVERT_VERSION, | ||
| log, | ||
| }: DocumentMigratorOptions) { | ||
| const kibanaVersion = rawKibanaVersion.split('-')[0]; // coerce a semver-like string (x.y.z-SNAPSHOT) or prerelease version (x.y.z-alpha) to a regular semver (x.y.z) |
Contributor
Author
There was a problem hiding this comment.
I first attempted to use the Semver.coerce function, which would coerce a prerelease version such as 7.12.0-alpha to a regular semver 7.12.0. However, this only appears to work for actual prerelease tags such as -alpha, not non-standard tags such as -SNAPSHOT. So I used a simple split which will work just as well.
Contributor
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
rudolf
approved these changes
Jan 22, 2021
Contributor
rudolf
left a comment
There was a problem hiding this comment.
I actually ran into a similar problem when using kibanaVersion in the index name for v2 migrations. We can merge this to unblock your backport, but then I'll move this logic up one layer.
jportner
added a commit
to jportner/kibana
that referenced
this pull request
Jan 22, 2021
9 tasks
rudolf
added a commit
to rudolf/kibana
that referenced
this pull request
Jan 28, 2021
This reverts commit 8263d47.
rudolf
added a commit
that referenced
this pull request
Jan 28, 2021
rudolf
added a commit
to rudolf/kibana
that referenced
this pull request
Feb 1, 2021
* migrations v2: fix snapshot builds * Revert "Fix sharing saved objects phase 2 CI (elastic#89056)" This reverts commit 8263d47.
rudolf
added a commit
to rudolf/kibana
that referenced
this pull request
Feb 8, 2021
* migrations v2: fix snapshot builds * Revert "Fix sharing saved objects phase 2 CI (elastic#89056)" This reverts commit 8263d47.
rudolf
added a commit
that referenced
this pull request
Feb 9, 2021
* Enable v2 so migrations, disable in FTR tests (#89297) * Enable v2 so migrations, disable in FTR tests * Disable v2 migrations for ui_settings integration tests * Disable v2 migrations for reporting without serucity api integration test # Conflicts: # test/common/config.js * migrations v2: fix snapshot builds (#89541) * migrations v2: fix snapshot builds * Revert "Fix sharing saved objects phase 2 CI (#89056)" This reverts commit 8263d47. * Fix documentMigrator for snapshot releases (#89936) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #80945 we implemented the second phase of Sharing Saved Objects.
When backporting that PR to 7.x in #88917, CI failed because the Kibana version in the CI run is
7.12.0-SNAPSHOT. The DocumentMigrator threw errors because migrations existed for saved objects in7.12.0, and the Semver library evaluatesSemver.gt('7.12.0', '7.12.0-SNAPSHOT') === true. So I submitted this PR to coerce strings such as7.12.0-SNAPSHOTto a regular semver, which will allow CI to pass.