Vamsi-klu opened a new pull request, #67764:
URL: https://github.com/apache/airflow/pull/67764

   ### What / impact
   
   Setting `[scheduler] use_job_schedule=False` silently stopped **all** asset- 
and partitioned-asset-triggered Dag runs — not just cron/time-based runs. 
Event- and data-driven pipelines that rely on asset scheduling would stop 
firing with no error, even though the flag is documented to turn off only cron 
interval scheduling. After this change the flag disables only time-based (cron) 
scheduling; asset-, partitioned-asset-, and manually-triggered runs are still 
created.
   
   ### Why
   
   `use_job_schedule` gated the entire `_create_dagruns_for_dags` call in 
`_do_scheduling`, but that method creates three kinds of runs: 
partitioned-asset (top of the method), time-based, and asset-triggered. Only 
the time-based path should be governed by the flag. This moves the gate so it 
wraps only the time-based `_create_dag_runs(non_asset_dags, …)` call; the 
orchestrator — and therefore the asset/partition paths — always runs. The 
"Disable the scheduler" maintenance docs, which previously claimed this flag 
stops all new Dag runs, are updated to match.
   
   ### How it unblocks
   
   Restores the documented behavior for deployments that turn off cron 
scheduling while still relying on asset-driven scheduling. Supersedes #62931, 
which was closed for author inactivity (not rejection) — the approach was never 
disputed and member Lee-W called it "a valid one".
   
   ### Tests
   
   Three new regression tests in `test_scheduler_job.py`, each verified to fail 
on the unfixed code: asset-triggered runs created with the flag off, 
partitioned-asset runs created with the flag off, and a flag-on companion 
proving the time-based gate still suppresses cron runs. Full scheduler suite 
and the exact-query-count tests pass; mypy + pre-commit + manual static checks 
are green.
   
   closes: #62929
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to