-
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
Fix sharing saved objects phase 2 CI #89056
Fix sharing saved objects phase 2 CI #89056
Conversation
This is required for CI runs when the Kibana version is a snapshot.
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) |
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 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.
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
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 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.
This reverts commit 8263d47.
* migrations v2: fix snapshot builds * Revert "Fix sharing saved objects phase 2 CI (elastic#89056)" This reverts commit 8263d47.
* migrations v2: fix snapshot builds * Revert "Fix sharing saved objects phase 2 CI (elastic#89056)" This reverts commit 8263d47.
* 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 <[email protected]>
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-SNAPSHOT
to a regular semver, which will allow CI to pass.