-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[ext] remove report_asset_metadata, report_asset_data_version #16683
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
87806df
to
39a0273
Compare
39a0273
to
e5e0778
Compare
e5e0778
to
d6bb8aa
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.
much better. what is going on with hardcoding type to None?
) | ||
new_metadata[key] = cast(ExtMetadataValue, value) | ||
else: | ||
new_metadata[key] = {"raw_value": value, "type": 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.
type hardcoded to 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.
With type None, we feed the raw value to our metadata type inference routine on the orchestration side, instead of replicating that logic here. I added an explanatory comment.
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.
where is the related code on the orch side?
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.
Untyped metadata values always get run through this: https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/definitions/metadata/__init__.py#L106-L135
Which is called here: https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/ext/context.py#L54-L55
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.
Ok. I would much rather have this be an explicit value rather than None
. e.g. "infer"
, "untyped"
etc I think that would be more clear and obvious
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.
Good idea, I made it "__infer__"
d6bb8aa
to
6f21afe
Compare
1b2d25a
to
c50e6b4
Compare
6f21afe
to
c2aab86
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.
see comment about None
c2aab86
to
b6d86eb
Compare
186a160
to
c8300d8
Compare
EXT_METADATA_TYPE_INFER = "__infer__" | ||
|
||
ExtMetadataType = Literal[ | ||
"__infer__", |
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.
infer is comment-worthy
c8300d8
to
8788e2f
Compare
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-8fk07ppsv-elementl.vercel.app Direct link to changed pages: |
## Summary & Motivation Remove `report_asset_metadata` and `report_asset_data_version` in favor of a single `report_asset_materialization` method, which requires reporting all of the data associated with a materialization at once. Calling `report_asset_materialization` twice for the same asset is an error. ## How I Tested These Changes Updated unit tests.
Summary & Motivation
Remove
report_asset_metadata
andreport_asset_data_version
in favor of a singlereport_asset_materialization
method, which requires reporting all of the data associated with a materialization at once. Callingreport_asset_materialization
twice for the same asset is an error.How I Tested These Changes
Updated unit tests.