-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Always re-run Feature migrations which have encountered errors #83918
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Hi @gwbrown, I've created a changelog YAML for you. |
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.
Looks good, just a couple comments on the test.
|
||
@Override | ||
public void onFailure(Exception e) { | ||
clusterStateUpdated.set(false); |
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.
This should probably be captured and cause the assertBusy to fail with an assertion?
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.
👍 Good point.
PostFeatureUpgradeRequest migrationRequest = new PostFeatureUpgradeRequest(); | ||
PostFeatureUpgradeResponse migrationResponse = client().execute(PostFeatureUpgradeAction.INSTANCE, migrationRequest).get(); | ||
// Make sure we actually started the migration | ||
final Set<String> migratingFeatures = migrationResponse.getFeatures() |
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.
Converting to a set isn't anymore efficient than just looking through the list. Is there som other reason we need an intermediate set to assert the feature was processed?
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.
This was a copy/paste from another test, you're right there's not much point to converting to a set here. I'll simplify.
… si/migration/rerun-errors
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
…ic#83918) This PR addressed the behavior described in elastic#83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates elastic#83917.
…ic#83918) This PR addressed the behavior described in elastic#83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates elastic#83917.
… (#84139) This PR addressed the behavior described in #83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates #83917.
…#83918) (#84137) * Always re-run Feature migrations which have encountered errors (#83918) This PR addressed the behavior described in #83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates #83917. * Adjust for method signature differences in this branch
* upstream/master: (167 commits) Mute FrozenSearchableSnapshotsIntegTests#testCreateAndRestorePartialSearchableSnapshot Mute LdapSessionFactoryTests#testSslTrustIsReloaded Fix spotless violation from last commit Mute GeoGridTilerTestCase#testGeoGridSetValuesBoundingBoxes_UnboundedGeoShapeCellValues Small formatting clean up (elastic#84144) Always re-run Feature migrations which have encountered errors (elastic#83918) [DOCS] Clarify `orientation` usage for WKT and GeoJSON polygons (elastic#84025) Group field caps response by index mapping hash (elastic#83494) Shrink join queries in slow log (elastic#83914) TSDB: Reject the nested object fields that are configured time_series_dimension (elastic#83920) [DOCS] Remove note about partial response from Bulk API docs (elastic#84053) Allow regular data streams to be migrated to tsdb data streams. (elastic#83843) [DOCS] Fix `ignore_unavailable` parameter definition (elastic#84071) Make Metadata extend AbstractCollection (elastic#83791) Add API specs for OpenID Connect APIs Revert "Clean up for superuser role name references (elastic#83627)" (elastic#84096) Update Lucene analysis base url (elastic#84094) Avoid null threadContext in ResultDeduplicator (elastic#84093) Use static empty store files metadata (elastic#84034) Preserve context in snapshotDeletionListeners (elastic#84089) ... # Conflicts: # x-pack/plugin/rollup/build.gradle
…ic#83918) This PR addressed the behavior described in elastic#83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates elastic#83917.
…83918) (#84138) * Always re-run Feature migrations which have encountered errors (#83918) This PR addressed the behavior described in #83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates #83917. * Resolve compilation failures for 8.0 branch
…ic#83918) This PR addressed the behavior described in elastic#83917, in which Feature migrations which have encountered errors are not re-run in some cases. As of this PR, Features which have encountered errors during migration are treated the same as Features requiring migration. This PR also adds a test which artificially replicates elastic#83917.
This PR addressed the behavior described in #83917, in which Feature migrations
which have encountered errors are not re-run in some cases. As of this PR, Features
which have encountered errors during migration are treated the same as Features
requiring migration.
This PR also adds a test which artificially replicates #83917.
Fixes #83917.