-
Notifications
You must be signed in to change notification settings - Fork 80
remove redundant reconcile config params #2150
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
base: main
Are you sure you want to change the base?
Changes from all commits
773bad2
5ccce14
864322f
3dcb896
619a3de
7fc114f
f661fd1
53d37ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -210,19 +210,17 @@ def v2_migrate(cls, raw: dict[str, Any]) -> dict[str, Any]: | |
| @dataclass | ||
| class TableRecon: | ||
| __file__ = "recon_config.yml" | ||
| __version__ = 1 | ||
| __version__ = 2 | ||
|
|
||
| source_schema: str | ||
| target_catalog: str | ||
| target_schema: str | ||
| tables: list[Table] | ||
| source_catalog: str | None = None | ||
|
Comment on lines
-215
to
-219
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're changing the schema of something we store in the user's workspace, I think we need:
Even if loading ignores (now unknown) fields, an older version of the code will choke if it tries to load an instance persisted with this new schema.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since this is a backwards compatible change, I didn't bump the version. So I added a test for testing that.
And I am not aware of any forward-compatibility support in blueprint. or did I misunderstood something?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's the issue:
The scenario is:
This leads to:
Both are errors, but the second one is controlled and expected, and also much easier to diagnose.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it. just pushed version 2 |
||
|
|
||
| def __post_init__(self): | ||
| self.source_schema = self.source_schema.lower() | ||
| self.target_schema = self.target_schema.lower() | ||
| self.target_catalog = self.target_catalog.lower() | ||
| self.source_catalog = self.source_catalog.lower() if self.source_catalog else self.source_catalog | ||
| @classmethod | ||
| def v1_migrate(cls, raw: dict[str, Any]) -> dict[str, Any]: | ||
| old_keys = ["source_catalog", "source_schema", "target_catalog", "target_schema"] | ||
| for key in old_keys: | ||
| raw.pop(key, None) | ||
| raw["version"] = 2 | ||
| return raw | ||
|
|
||
|
|
||
| @dataclass | ||
|
|
@@ -246,12 +244,6 @@ class ValidationResult: | |
| exception_msg: str | None | ||
|
|
||
|
|
||
| @dataclass | ||
| class ReconcileTablesConfig: | ||
| filter_type: str # all/include/exclude | ||
| tables_list: list[str] # [*, table1, table2] | ||
|
|
||
|
|
||
| @dataclass | ||
| class ReconcileMetadataConfig: | ||
| catalog: str = "remorph" | ||
|
|
@@ -269,8 +261,6 @@ class ReconcileConfig: | |
| secret_scope: str | ||
| database_config: DatabaseConfig | ||
| metadata_config: ReconcileMetadataConfig | ||
| job_id: str | None = None | ||
| tables: ReconcileTablesConfig | None = None | ||
|
Comment on lines
-272
to
-273
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also here, regarding version/schema change.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can bump the version but I would not (here at least).
|
||
|
|
||
|
|
||
| @dataclass | ||
|
|
||
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'm not sure what the changes in here are, this looks like static documentation setup rather than content-related?
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 is reconcile notebook exported as html from databricks workspace. the change in the notebook is deleting the removed config