Content-Length: 276654 | pFad | http://github.com/apache/airflow/pull/50638

AF Activate assets before adding trigger references by uranusjr · Pull Request #50638 · apache/airflow · GitHub
Skip to content

Activate assets before adding trigger references #50638

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

Merged

Conversation

uranusjr
Copy link
Member

Active assets are referenced when we check what triggers to track for asset events.

active_assets = _find_active_assets(self.assets, session=session) if self.assets else {}

If we activate assets after adding triggers, new assets will need to wait for an extra round to be picked up. This is functionally fine, but there's also no reason why we can't have them picked up earlier, without having to wait an extra parsing iteration.

@uranusjr uranusjr requested review from XD-DENG and ashb as code owners May 15, 2025 06:56
@uranusjr uranusjr force-pushed the activate-asset-before-trigger-references branch from 85070d5 to 69f0b21 Compare May 15, 2025 06:59
uranusjr added 2 commits May 19, 2025 13:23
Active assets are referenced when we check what triggers to track for
asset events. If we activate assets after adding triggers, new assets
will need to wait for an extra round to be picked up. This is
functionally fine, but there's also no reason why we can't have them
picked up earlier, without having to wait an extra parsing iteration.
The dag_maker activates assets and establish relations eagerly,
complicating test setup. Since we're testing the dag and asset
collection logic in the dag processor, it's better to use the
user-facing classes directly since that is the layer the processor is
dealing with.
@uranusjr uranusjr force-pushed the activate-asset-before-trigger-references branch from 69f0b21 to e8a396a Compare May 19, 2025 06:08
@uranusjr uranusjr added this to the Airflow 3.1.0 milestone May 20, 2025
@uranusjr uranusjr merged commit bcb42e2 into apache:main May 20, 2025
51 checks passed
@uranusjr uranusjr deleted the activate-asset-before-trigger-references branch May 20, 2025 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/pull/50638

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy