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

fix(taskinstnace): set internal asset_type of all Asset subclass to "Asset" #47598

Closed
wants to merge 4 commits into from

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Mar 11, 2025

It's a temporary, unclean workaround and should be reworked later, but it can solve the current bug

Why

Currently, asset_type decides how we register asset events.
(Note that the asset_type here is asset object type (e.g., Asset, AssetAlias) instead of Asset.asset_type)
As Asset might be subclassed, all instances of Asset subclasses should have "Asset" as their asset_type.

What

If the object is an instance of Asset, set the asset_type (the one we use to decide how we register asset events) to "Asset"


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Currently, asset_type is used to decide how we register asset event.
(note that the asset_type here is object type instead of Asset.asset_type)
As Asset might be subclass, all instances of Asset subclasses should have "Asset" as their asset_type
@Lee-W Lee-W changed the title fix(taskinstnace): set the asset_type of all Asset subclass to "Asset" fix(taskinstnace): set asset_type of all Asset subclass to "Asset" Mar 11, 2025
@Lee-W Lee-W force-pushed the correctly-handle-asset-type branch from 41d56c8 to c298093 Compare March 11, 2025 07:55
@uranusjr uranusjr self-assigned this Mar 12, 2025
@Lee-W Lee-W changed the title fix(taskinstnace): set asset_type of all Asset subclass to "Asset" fix(taskinstnace): set internal asset_type of all Asset subclass to "Asset" Mar 12, 2025
@Lee-W Lee-W marked this pull request as ready for review March 12, 2025 05:19
@Lee-W Lee-W requested review from XD-DENG and ashb as code owners March 12, 2025 05:20
@Lee-W
Copy link
Member Author

Lee-W commented Mar 12, 2025

close it in favor of #47659

@Lee-W Lee-W closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants