Skip to content
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

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Sep 21, 2023

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.

@smackesey
Copy link
Collaborator Author

smackesey commented Sep 21, 2023

@smackesey smackesey changed the base branch from sean/ext-use-materialize-result to master September 21, 2023 12:25
@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from 87806df to 39a0273 Compare September 21, 2023 12:25
@smackesey smackesey marked this pull request as ready for review September 21, 2023 12:45
@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from 39a0273 to e5e0778 Compare September 21, 2023 12:48
@smackesey smackesey changed the base branch from master to sean/ext-minor-fixes September 21, 2023 13:09
@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from e5e0778 to d6bb8aa Compare September 21, 2023 13:09
@smackesey smackesey mentioned this pull request Sep 21, 2023
Copy link
Member

@schrockn schrockn left a 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}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type hardcoded to None?

Copy link
Collaborator Author

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.

Copy link
Member

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?

Copy link
Collaborator Author

@smackesey smackesey Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@schrockn schrockn Sep 21, 2023

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

Copy link
Collaborator Author

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__"

@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from d6bb8aa to 6f21afe Compare September 21, 2023 13:28
@smackesey smackesey requested a review from schrockn September 21, 2023 13:30
Base automatically changed from sean/ext-minor-fixes to master September 21, 2023 14:27
@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from 6f21afe to c2aab86 Compare September 21, 2023 14:28
Copy link
Member

@schrockn schrockn left a 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

@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from c2aab86 to b6d86eb Compare September 21, 2023 16:50
@smackesey smackesey requested a review from schrockn September 21, 2023 16:51
@smackesey smackesey force-pushed the sean/ext-remove-reporters branch 2 times, most recently from 186a160 to c8300d8 Compare September 21, 2023 17:12
Comment on lines +111 to +115
EXT_METADATA_TYPE_INFER = "__infer__"

ExtMetadataType = Literal[
"__infer__",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

infer is comment-worthy

@smackesey smackesey force-pushed the sean/ext-remove-reporters branch from c8300d8 to 8788e2f Compare September 21, 2023 18:55
@github-actions
Copy link

Deploy preview for dagster-docs ready!

Preview available at https://dagster-docs-8fk07ppsv-elementl.vercel.app
https://sean-ext-remove-reporters.dagster.dagster-docs.io

Direct link to changed pages:

@smackesey smackesey merged commit c402db0 into master Sep 21, 2023
1 check passed
@smackesey smackesey deleted the sean/ext-remove-reporters branch September 21, 2023 19:41
prha pushed a commit that referenced this pull request Sep 22, 2023
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants