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

feat: Fall back to datasets' "extra" if arg extra is empty #37491

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions airflow/datasets/manager.py
Copy link
Member

Choose a reason for hiding this comment

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

Personally, I don't think the dataset extra is a good fallback for a dataset event's extra. I see those extras as being different.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def register_dataset_change(
For local datasets, look them up, record the dataset event, queue dagruns, and broadcast
the dataset event
"""
if extra is None and dataset.extra:
extra = dataset.extra

dataset_model = session.scalar(
select(DatasetModel)
.where(DatasetModel.uri == dataset.uri)
Expand Down