-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add Patch migration step type #153
Merged
Merged
Conversation
This file contains 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
ulucinar
force-pushed
the
fix-e87
branch
3 times, most recently
from
February 2, 2023 14:56
677ad0c
to
5e8f2a3
Compare
…targets if they conform to the target's schema - Remove patches from targets if the patch target/source field does not exist or is of a different type in the target - Include patches in targets if the patch target/source field exists and is of the same type in the target Signed-off-by: Alper Rifat Ulucinar <[email protected]>
- Convert migration plan steps pause-managed, pause-composites, edit-composites, edit-claims, deletion-policy-orphan, start-managed, start-composites to this Patch type Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
PatchSet conversion is handled by PatchSet converters with global context Signed-off-by: Alper Rifat Ulucinar <[email protected]>
…ation.ComposedTemplateConverter for decoupling and modularizing converters. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
3 tasks
sergenyalcin
approved these changes
May 16, 2023
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.
Thanks @sergenyalcin! |
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.
Description of your changes
This PR proposes to add the
Patch
step type to the migration plan and converts the following steps to this new type:As an example, the generated manifest for pausing a managed resource in the
pause-managed
migration plan step now looks like the following:And the corresponding migration step now looks like the following:
This PR also adds
migration.PatchSetConverter
for converting Composition-widePatchSet
s without the context of a targetComposedTemplate
. GlobalPatchSet
conversions, like atag
conversion can be performed with these converters.migration.PatchSetConverter
s are invoked beforeComposition
converters and if a convertedPatchSet
's schema is compatible with the migration targets, it's automatically inherited if the source has a reference to the same name.The
migration.Converter.Composition
API now accepts only the subset ofPatchSet
s that are referenced by the migration source.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Tested manually using a sample migrator.