-
Notifications
You must be signed in to change notification settings - Fork 14.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
Respect Asset.name when accessing inlet and outlet events #44639
Merged
Lee-W
merged 15 commits into
apache:main
from
astronomer:add-attribute-name-support-to-inlet-outlet-events
Dec 11, 2024
Merged
Respect Asset.name when accessing inlet and outlet events #44639
Lee-W
merged 15 commits into
apache:main
from
astronomer:add-attribute-name-support-to-inlet-outlet-events
Dec 11, 2024
Conversation
This file contains 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
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
2 times, most recently
from
December 4, 2024 10:05
4e91b11
to
18404ac
Compare
3 tasks
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
2 times, most recently
from
December 4, 2024 14:58
a9755cb
to
eddc6c8
Compare
Lee-W
requested review from
potiuk,
ashb,
bolkedebruin and
XD-DENG
as code owners
December 5, 2024 03:21
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
3 times, most recently
from
December 5, 2024 08:40
9843519
to
178ecf4
Compare
Lee-W
changed the title
Add attribute.name support to inlet outlet events
Respect Asset.name when accessing inlet and outlet events
Dec 5, 2024
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
2 times, most recently
from
December 6, 2024 04:27
44dd173
to
411362d
Compare
uranusjr
reviewed
Dec 9, 2024
uranusjr
reviewed
Dec 9, 2024
uranusjr
reviewed
Dec 9, 2024
uranusjr
reviewed
Dec 9, 2024
uranusjr
reviewed
Dec 9, 2024
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
from
December 9, 2024 09:42
411362d
to
7140d60
Compare
uranusjr
reviewed
Dec 9, 2024
uranusjr
reviewed
Dec 9, 2024
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
from
December 9, 2024 09:50
5ea5eac
to
8183004
Compare
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
from
December 10, 2024 10:32
f047a64
to
e9b0f3c
Compare
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
3 times, most recently
from
December 10, 2024 13:32
58c7370
to
2ae0335
Compare
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
2 times, most recently
from
December 11, 2024 02:57
031d8ed
to
d3bcd7c
Compare
uranusjr
reviewed
Dec 11, 2024
uranusjr
reviewed
Dec 11, 2024
uranusjr
approved these changes
Dec 11, 2024
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.
One minor thing. Should be ready for merge otherwise.
…et_key for AssetAliasEvent
…_obj methods to to_asset, to_asset_alias
Co-authored-by: Tzu-ping Chung <[email protected]>
…asset or non-asset-alias is passed
Lee-W
force-pushed
the
add-attribute-name-support-to-inlet-outlet-events
branch
from
December 11, 2024 07:21
d3bcd7c
to
3054e68
Compare
ellisms
pushed a commit
to ellisms/airflow
that referenced
this pull request
Dec 13, 2024
* docs: removing examples that accessing inlet and outlet events * feat(utils/context): Deprecate accessing inlet and outlet events through string * fix(util/context): use asset unique key in outlet event accessors * feat(asset): extend AssetAliasEvent to include asset uri and asset name * refactor(asset): merge dest_asset_name and dest_asset_uri to dest_asset_key for AssetAliasEvent * refactor(context): fix context typing * feat(utils/context): add back string access to inlet and outlet events * feat(utils/context): forbid using string to access inlet and outlet event * feat(utils/context): rename AssetUniqueKey and AssetAliasUniqueKey to_obj methods to to_asset, to_asset_alias * refactor(utils/context): remove redundant iter call Co-authored-by: Tzu-ping Chung <[email protected]> * feat(metadata): remove string access support to Metadata * fix(serialization): fix asset unique key serialization * feat(asset): make asset unique key an attrs * fix(serialization): fix asset unique and asset alias unique serialization * feat(utils/context): change outlet_event error to TypeError when non-asset or non-asset-alias is passed --------- Co-authored-by: Tzu-ping Chung <[email protected]>
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.
Why
AIP-74 introduces the name attribute to the asset (previously dataset) class, but the
outlet_events
andinlet_events
still only respect the URI attribute.What
When the users try to access an inlet/outlet event with the asset object, it tries to fetch the asset that matches both the name and URI.
before this change, it tries to fetch
Asset(uri="test://uri", name="test://uri")
insteadclose: #44601
^ 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.