-
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 support for categorical converters #217
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
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
2 times, most recently
from
June 20, 2023 18:38
2605aa4
to
ad98956
Compare
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
from
June 20, 2023 18:54
ad98956
to
d269972
Compare
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Sergen Yalçın <[email protected]>
Signed-off-by: Sergen Yalçın <[email protected]>
Signed-off-by: Sergen Yalçın <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
8 times, most recently
from
July 3, 2023 23:45
0e39407
to
5413b2d
Compare
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
from
July 4, 2023 14:15
5413b2d
to
88dc9b6
Compare
Signed-off-by: Sergen Yalçın <[email protected]>
Signed-off-by: Sergen Yalçın <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
from
July 5, 2023 08:06
1a0b494
to
30375fa
Compare
- Do not use dynamic Client for categorical retrieval with the Kubernetes source Signed-off-by: Alper Rifat Ulucinar <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
from
July 5, 2023 10:05
30375fa
to
2303f9f
Compare
Signed-off-by: Sergen Yalçın <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Sergen Yalçın <[email protected]>
Signed-off-by: Sergen Yalçın <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
from
July 6, 2023 13:10
dab501d
to
2c01279
Compare
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
ulucinar
force-pushed
the
categorical-converters
branch
from
July 6, 2023 16:22
3cc0c1b
to
424f2cb
Compare
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
1 task
sergenyalcin
approved these changes
Jul 7, 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 @ulucinar LGTM!
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 adds support for the categorical converters, which allows converters to work on the whole category of resources, such as the
managed
resources. The migration registry allows registration of category converters via theRegistry.RegisterCategoricalConverter
function and categorical converters receive and act on unstructured objects.It also introduces support for categorical preprocessors: A registered (with the migration registry) preprocessor is guaranteed to be run before any registered converters are run. Preprocessors can currently be registered for the CRD categories and they can be used to alter (to supply parameters to) the behavior of any converters run downstream.
We also introduce support for converters of various types such as Crossplane's
Configuration.pkg
,Configuration.meta
,Provider.pkg
,Lock.pkg
, etc., which will be employed in various migrators targeting conversions from (community or official) monoliths to provider families.We also add the
migration.PlanExecutor
supportingmigration.ExecutorCallback
. APlanExecutor
is responsible for driving the execution of theStep
s of a migrationPlan
using its configuredExecutor
. The repo currently hosts a singleExecutor
implementation:migration.ForkExecutor
, which can execute migration plan steps by forking child processes.ExecutorCallback
implementations can be used to be notified:Step
is executed. This allows a callback implementation to skip or continue with the execution of theStep
or may be used to cancel the execution of thePlan
.Step
. This allows an implementation to be notified of a successful step execution and the execution of thePlan
can be cancelled.Step
execution failure: This allows an implementation to be notified of a failed step execution and theStep
execution may be repeated (for instance after editing any resource manifests or patch documents theStep
refers to), skipped, or thePlan
execution can be cancelled.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
The PR has been tested using upbound/extensions-migration#12.