fix(scheduler): don't skip asset-triggered dag runs when use_job_schedule is False#62931
Open
YoannAbriel wants to merge 2 commits intoapache:mainfrom
Open
fix(scheduler): don't skip asset-triggered dag runs when use_job_schedule is False#62931YoannAbriel wants to merge 2 commits intoapache:mainfrom
YoannAbriel wants to merge 2 commits intoapache:mainfrom
Conversation
8230a17 to
f7c14e4
Compare
…dule is False When use_job_schedule=False, asset-triggered dag runs and partitioned asset dag runs were incorrectly skipped along with time-based scheduling. The fix moves the use_job_schedule check inside _create_dagruns_for_dags so that only time-based (cron/interval) dag run creation is skipped, while asset-triggered dag runs are always created. Fixes apache#62929 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f7c14e4 to
9ddd50c
Compare
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.
Problem
use_job_schedule=Falsedisables both time-based and asset-based scheduling. The config is documented as only affecting cron interval scheduling, but asset-triggered DAGs also stop getting scheduled.Root Cause
In
SchedulerJobRunner._do_scheduling_loop, the entire_create_dagruns_for_dagscall is gated behinduse_job_schedule. That method handles both time-based and asset-triggered dag run creation, so setting the flag toFalseskips everything.Fix
Moved the
use_job_schedulecheck inside_create_dagruns_for_dagsso it only gates_create_dag_runs(time-based). Asset-triggered and partitioned asset dag runs are always processed regardless of the setting.Added two tests verifying that with
use_job_schedule=False:Closes: #62929
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.