Skip to content

Comments

Remove pre-execute asset activeness check#47893

Merged
uranusjr merged 1 commit intoapache:mainfrom
astronomer:do-not-check-activation-pre-execute
Mar 18, 2025
Merged

Remove pre-execute asset activeness check#47893
uranusjr merged 1 commit intoapache:mainfrom
astronomer:do-not-check-activation-pre-execute

Conversation

@uranusjr
Copy link
Member

@uranusjr uranusjr commented Mar 18, 2025

We now check activeness after task execution, while emitting asset events (see #47677), making this pre-execution check less needed.

Removing this pre-execution check avoids a possible race condition, where a DAG is triggered too quickly after it's enabled. The scheduler needs a little time to process the enable event and register the asset as active, and a run fired too fast can be processed before that happens, causing the API to incorrectly report an asset as inactive.

Close #47720.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:task-sdk labels Mar 18, 2025
We now check activeness after task execution, while emitting asset
events (see 7458bd9), making this
pre-execution check less needed.

Removing this pre-execution check avoids a possible race condition,
where a DAG is triggered too quickly after it's enabled. The scheduler
needs a little time to process the enable event and register the asset
as active, and a run fired too fast can be processed before that
happens, causing the API to incorrectly report an asset as inactive.
@uranusjr uranusjr force-pushed the do-not-check-activation-pre-execute branch from f3e7746 to 77ab1a8 Compare March 18, 2025 07:51
@uranusjr uranusjr changed the title Make asset.multi an AssetAll Remove pre-execute asset activeness check Mar 18, 2025
@uranusjr uranusjr marked this pull request as ready for review March 18, 2025 07:52
@uranusjr uranusjr requested a review from Lee-W March 18, 2025 07:53
@uranusjr uranusjr merged commit 53ec90c into apache:main Mar 18, 2025
91 of 116 checks passed
@uranusjr uranusjr deleted the do-not-check-activation-pre-execute branch March 18, 2025 08:58
agupta01 pushed a commit to agupta01/airflow that referenced this pull request Mar 21, 2025
We now check activeness after task execution, while emitting asset
events (see 7458bd9), making this
pre-execution check less needed.

Removing this pre-execution check avoids a possible race condition,
where a DAG is triggered too quickly after it's enabled. The scheduler
needs a little time to process the enable event and register the asset
as active, and a run fired too fast can be processed before that
happens, causing the API to incorrectly report an asset as inactive.
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
We now check activeness after task execution, while emitting asset
events (see 7458bd9), making this
pre-execution check less needed.

Removing this pre-execution check avoids a possible race condition,
where a DAG is triggered too quickly after it's enabled. The scheduler
needs a little time to process the enable event and register the asset
as active, and a run fired too fast can be processed before that
happens, causing the API to incorrectly report an asset as inactive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue running task of an asset decorated dag

2 participants