-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix state:modified check for exports #10565
Fix state:modified check for exports #10565
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
0163e47
to
debaf76
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10565 +/- ##
==========================================
- Coverage 88.91% 88.86% -0.05%
==========================================
Files 180 180
Lines 22755 22760 +5
==========================================
- Hits 20232 20226 -6
- Misses 2523 2534 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
debaf76
to
fea309b
Compare
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 think the changes are fine, but we need an update to the schemas: https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/artifacts/README.md#updating-schemasgetdbtcom. I'll approve this but it would be best to get the schema updated fairly soon.
To skip the failure in checking schemas, you add the "artifact_minor_update" label.
dbt-labs/schemas.getdbt.com#50 is the PR for the schema change |
fea309b
to
bed29b3
Compare
bed29b3
to
340c5a4
Compare
340c5a4
to
78bd04f
Compare
78bd04f
to
a95fa4f
Compare
and old_export.config.schema_name == new_export.config.schema_name | ||
and old_export.config.alias == new_export.config.alias | ||
): | ||
if not (old_export.name == new_export.name): |
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.
The check is out of date, the newest one show 100% coverage https://github.com/dbt-labs/dbt-core/pull/10565/checks?check_run_id=29180771199
keys = ["export_as", "schema", "alias"] | ||
for key in keys: | ||
if old_export.unrendered_config.get(key) != new_export.unrendered_config.get(key): | ||
return 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.
Same here
Resolves #10138
Problem
Saved queries always show up as modified in CI because of the check old_export.config.schema_name == new_export.config.schema_name (old schema is prod schema and new schema is CI schema).
Solution
Add unrendered_config to exports and compare the unrendered config instead of the config
Checklist