fix: (PoC) (do not merge) (CDK) (Manifest) - Migrate manifest fields #463
Closed
fix: (PoC) (do not merge) (CDK) (Manifest) - Migrate manifest fields #463
Conversation
added 16 commits
April 10, 2025 16:28
…ll migrations available
Contributor
|
somewhat minor comment: should this code live outside of the |
Contributor
|
another high-level thing. Before you open this PR for review, I wonder if it makes sense to break down the changes into several related PRs since there is a lot happening here. What about something like this? PR1: introduce the migration framework |
bnchrch
reviewed
Apr 16, 2025
| ) | ||
|
|
||
|
|
||
| class V_6_45_2_ManifestMigration_HttpRequesterUrlBaseToUrl(ManifestMigration): |
added 2 commits
April 22, 2025 11:17
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.
What
Resolves:
How
Manifest Migrations:
Introduced a framework to handle manifest migrations in the
Airbyte CDKto apply transformations on given manifest.Added migration logic to convert
url_baseandpathtourl.http_requester_url_base_to_url_v6_45_2__0.pyhttp_requester_path_to_url_v6_45_2__1.pyCreated migration files with clear
versioningandorderhandling.Registered migration classes dynamically and applied them in order.
Updated Component Models:
HttpRequesterto support the newurlfield and prioritize it.url_baseandpathfields.Deprecation of url_base and path fields:
HttpRequester.urlfield to replace the deprecatedurl_baseandpathfields.url_baseandpathasdeprecatedwith deprecation messages.Handling Deprecation Warnings:
deprecation_warningsmethod to theDeclarativeSourceandManifestDeclarativeSourceclass to collect and process deprecation notices._categorise_groups()to handle deprecation warnings alongside message groups.BaseModelWithDeprecations.airbyte_cdk/sources/declarative/models/base_model_with_deprecations.pymodule is added to cover thedeprecationwarnings for the fields marked asdeprecated. This class is static (not autogenerated) and re-used when thedeclarative_component_schema.pyis being generated. In this way, there is no need to set additional validations on top of the existing component implementations.Unit Tests and Documentation:
unit_tests/sources/declarative/migrations/test_manifest_migration.pyREADME.mdin themanifest/migrationsdirectory to document the migration framework.User Impact
migrate_manifest: bool = Falseby default, to not to have any regressions, before we're ready to use it within the UI (/resolveshould be havingmigrate: boolflag to set the migration toTrue)Related PR parts:
Manifest Normalizer- fix: (CDK) (Manifest) - AddManifest Normalizationmodule (reduce commonalities + handle schema $refs) #447Deprecation Warning examples
The deprecation rules applied to the
declarative_component_schema.yamlare automatically picked up and propagated to thedeclarative_component_schema.py(auto-gen models), see the example bellow.Warning example
When
usingthe deprecated field orcreatingan instance of the class with the deprecated field.Python default behavior:
If multiple fields are marked as
deprecatedand used - more than 1 deprecation message is shown.Connector Builder behavior: