hussein-awala opened a new pull request, #76311:
URL: https://github.com/apache/airflow/pull/76311
Allow a caller to set a runtime limit for an individual Dag run without
changing the Dag definition or the limits on other runs. For example,
`{"logical_date": null, "dag_run_timeout": "PT30M"}` gives one manually
triggered run a 30-minute limit. Omitting the field, or passing `null`, retains
the selected Dag version's `dagrun_timeout` default.
The override is persisted on the run and enforced by the scheduler from its
start time, excluding time spent queued. It can shorten or extend the default,
or supply a limit when the Dag has none. Expiration uses the existing Dag
timeout behavior: the run fails and unfinished task instances are skipped.
This covers the public REST API, Execution API, UI, `airflow` and
`airflowctl` trigger paths, asset materialization, and newly created backfill
runs. Clearing preserves the stored override; backfills that reuse a run
preserve that run's setting. It includes an additive nullable database column,
API compatibility migrations, generated client/schema updates, documentation,
and tests. `TriggerDagRunOperator` integration remains the separately requested
second step.
The CLI and UI accept seconds; REST, Execution API, and `airflowctl` accept
ISO 8601 durations. Zero and negative overrides are rejected.
Validation completed locally against base `ffd9a2d126` (the final
conflict-free rebase also includes upstream `19d80a886b`):
- All regular static checks and applicable manual checks, including mypy,
security checks, SQLite migration round trips with foreign-key enforcement, and
TypeScript SDK build/package checks.
- Full Task SDK: 4,266 passed; airflowctl: 871 passed; generated Python REST
client: 383 passed.
- Full UI: 2,320 passed; simple-auth UI: 1 passed; TypeScript SDK: 957
passed; Go SDK normal and race suites passed.
- Provider database suites: 4,441 passed, 305 skipped.
- PostgreSQL and MySQL: 9 focused persistence/API readback cases passed on
each backend, including fractional seconds and the maximum supported duration.
**Pending for this draft:** complete core database/non-database suites,
provider non-database suite, and the full documentation build. Broad parallel
runs exceeded local Docker resources and some workers were killed; a provider
worker also encountered a pytest collection/path error. Lower-concurrency
retries and documentation generation were stopped when the author chose to
publish the draft with these checks pending. Forty-three documentation packages
completed, but the full/core documentation build is not verified. No passing
status is claimed for interrupted runs. CI and human review are still required
before marking this ready.
Performance: eight alternating baseline/feature samples against
`ffd9a2d126`, with an unchanged control moving -3.5%. The isolated scheduler
decision added 0.021 microseconds without a timeout and 0.335 microseconds with
an inherited timeout. Trigger-message construction and JSON serialization
showed no clear regression. This measures the timeout decision with a loaded
run, not end-to-end scheduler throughput; the change adds no scheduler queries.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Codex (GPT-6)
Generated-by: Codex (GPT-6) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
---
Drafted-by: Codex (GPT-6) (no human review before posting)
--
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]