-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 allow additional property for Model and SourceDefinition #11138
add allow additional property for Model and SourceDefinition #11138
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11138 +/- ##
==========================================
- Coverage 88.89% 88.85% -0.05%
==========================================
Files 187 187
Lines 23974 23978 +4
==========================================
- Hits 21312 21305 -7
- Misses 2662 2673 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -9121,19 +9133,7 @@ | |||
"type": "integer" | |||
}, | |||
"granularity": { | |||
"enum": [ |
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.
Not sure why this gets changed
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 checked out main branch and generated a schema, these changes are also there, so it is not particular to this PR
@@ -372,6 +372,7 @@ def expected_seeded_manifest(project, model_database=None, quote_model=False): | |||
"version": None, | |||
"latest_version": None, | |||
"time_spine": None, | |||
"batch": None, |
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 am not sure why I would have to add this field in expected manifest
@@ -503,6 +503,8 @@ def verify_manifest(project, expected_manifest, start_time, manifest_schema_path | |||
elif key in ["nodes", "sources", "exposures", "metrics", "disabled", "docs"]: | |||
for unique_id, node in expected_manifest[key].items(): | |||
assert unique_id in manifest[key] | |||
if "_event_status" in manifest[key][unique_id]: |
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.
Not sure why _event_status
starts to pop up
0f762b9
to
13acd66
Compare
26f80b7
to
7acd049
Compare
@@ -51,4 +52,10 @@ def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None): | |||
dct = super().__post_serialize__(dct, context) | |||
if context and context.get("artifact") and "defer_relation" in dct: | |||
del dct["defer_relation"] | |||
|
|||
# delete extra keys that should't be serialized |
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.
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.
Ohhhhhhhhh that makes sense. Thank you for figuring this out and removing it with the below process 👍
f800044
to
fda1eb9
Compare
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. |
# that are not present in the schema, from_dict will work fine. | ||
# As long as validate is not called, the schema will not be enforced. | ||
# This is intentional, as it allows for safer schema upgrades. | ||
raise RuntimeError( |
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 should probably be a dbtInternalError
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.
Small comment, otherwise LGTM! Thank you for adjusting the v12.json for future CI runs 👍
Allowing additional properties on Model and SourceDefinition so we are more forgiving at reading artifacts.
This change doesn't change user contract. User still cannot add additional fields to project freely
Checklist