Fix: Handle InputDefinition objects when mapping asset specs#32953
Merged
OwenKephart merged 2 commits intodagster-io:masterfrom Dec 15, 2025
Merged
Fix: Handle InputDefinition objects when mapping asset specs#32953OwenKephart merged 2 commits intodagster-io:masterfrom
OwenKephart merged 2 commits intodagster-io:masterfrom
Conversation
Contributor
|
@cmpadden @OwenKephart could you please take a look at this one? 🙏 I need it for Metaxy :) |
This resolves an AttributeError in OpDefinition.__init__ when assets defined
with explicit `ins={...}` are passed through `map_asset_specs`.
The fix ensures that InputDefinition objects are correctly identified and
not unnecessarily sent through a conversion method.
Includes regression test.
bb4a669 to
15f417e
Compare
OwenKephart
approved these changes
Dec 15, 2025
Contributor
OwenKephart
left a comment
There was a problem hiding this comment.
thanks for fixing this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32913
Summary & Motivation
This PR resolves an AttributeError that occurred when using the
dagster.map_asset_specsutility on an asset defined using the explicitinsparameter.The issue occurred during the reconstruction of the asset's underlying
OpDefinition. When inputs were sourced from the existingOpDefinition, they were already fully convertedInputDefinitionobjects. However, theOpDefinition.__init__logic expected user-facingInobjects and attempted to call the.to_definition()method on the already convertedInputDefinitionobject.How I Tested These Changes
I created a new regression test case,
test_map_asset_specs_asset_with_ins_regression, within thetest_asset_spec.pyfile.AttributeError, confirming the issue.OpDefinitionreconstruction now works correctly for assets with explicitins.Changelog