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

[bug] Fix issue causing ReconstructableJobs containing certain types of metadata to error #21819

Merged
merged 1 commit into from May 14, 2024

Conversation

OwenKephart
Copy link
Contributor

@OwenKephart OwenKephart commented May 13, 2024

Summary & Motivation

Resolves: #21815

Note that while the test involved here is referencing CacheableAssetsDefinition, this same error would occur with regular assets. Any asset using a MetadataValue which contains within it a mutable object (which would be table schema and table column lineage which contain lists I believe) would encounter a similar error.

After switching the core MetadataValue class from a NamedTuple to a pydantic model, the code we use to generate hashes for our serializable objects stopped handling them. This PR fixes this.

How I Tested These Changes

After updating the test to include metadata of this type, observed the mentioned error. These changes resolved it.

@OwenKephart OwenKephart requested a review from sryza May 13, 2024 21:27
Copy link
Contributor

@sryza sryza left a comment

Choose a reason for hiding this comment

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

Thanks for fixing. This NamedTuple -> DagsterModel change is the gift that keeps on giving.

@sryza sryza merged commit 2e49968 into master May 14, 2024
1 check passed
@sryza sryza deleted the owen/fix-reconstructable-job-hashing branch May 14, 2024 00:01
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.

Could not load job definition error "TypeError: unhashable type: 'list'"
2 participants