Rewrite asset event registration#47677
Merged
uranusjr merged 10 commits intoapache:mainfrom Mar 13, 2025
Merged
Conversation
There are many issues in the original implementation when you send something that's not a simple asset, I ended up almost rewritten the whole thing... Now, the task runner collects everything the user writes into outlet_events, and send all of them with the task's outlets as declared by the user verbatim to the API server. The server does all the resolution and filtering instead.
aac0864 to
222bb17
Compare
The task runner now emits slightly different data; extra is no longer eagerly resolved; the server side fills in the default automatically. Fixtures using asset refs now work correctly. The API server side tests are vastly improved to cover more kinds of data, including where events against other aliases are not incorrectly picked up when processing events originated from an alias.
e6d66e3 to
c2f7f16
Compare
The 'aliases' and 'source_alias_names' basically serve the same purpose, but we use each for a different section of the code. They can become one.
Exceptions are now raised if an event is raised against inactive assets.
2 tasks
Lee-W
reviewed
Mar 13, 2025
ashb
reviewed
Mar 13, 2025
This does not really matter in practice since inactive assets should have been caught before the task runs, but in case any are found, we can still try to trigger as many valid events as possible before failing the task.
kaxil
approved these changes
Mar 13, 2025
Lee-W
approved these changes
Mar 13, 2025
Member
Author
|
wtf is going on with those kub tests |
This was referenced Mar 13, 2025
1 task
nailo2c
pushed a commit
to nailo2c/airflow
that referenced
this pull request
Apr 4, 2025
There are many issues in the original implementation when you send something that's not a simple asset, I ended up almost rewritten the whole thing... Now, the task runner collects everything the user writes into outlet_events, and send all of them with the task's outlets as declared by the user verbatim to the API server. The server does all the resolution and filtering instead. The task runner now emits slightly different data; extra is no longer eagerly resolved; the server side fills in the default automatically. Fixtures using asset refs now work correctly. The API server side tests are vastly improved to cover more kinds of data, including where events against other aliases are not incorrectly picked up when processing events originated from an alias. Exceptions are now raised if an event is raised against inactive assets. Also removed redundant arg from register_asset_change. Arguments 'aliases' and 'source_alias_names' basically serve the same purpose, but we use each for a different section of the code. They can become one.
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.
There are many issues in the original implementation when you send something that's not a simple asset, I ended up almost rewritten the whole thing...
Now, the task runner collects everything the user writes into outlet_events, and send all of them with the task's outlets as declared by the user verbatim to the API server. The server does all the resolution and filtering instead.
Fix #46958 (in combination with #47659).