Skip to content

Add multiplier parameter to AverageRuntimeDeadline #63853#63904

Open
haseebmalik18 wants to merge 4 commits intoapache:mainfrom
haseebmalik18:add-multiplier-to-average-runtime-deadline
Open

Add multiplier parameter to AverageRuntimeDeadline #63853#63904
haseebmalik18 wants to merge 4 commits intoapache:mainfrom
haseebmalik18:add-multiplier-to-average-runtime-deadline

Conversation

@haseebmalik18
Copy link
Copy Markdown
Contributor

@haseebmalik18 haseebmalik18 commented Mar 18, 2026

Add multiplier parameter to AverageRuntimeDeadline so users can set deadlines as a proportion of the average runtime instead of only a fixed interval.

closes: #63853

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a multiplier parameter to the AverageRuntimeDeadline reference so deadline computation can be proportional to historical average runtime (e.g., 1.5× average), not only “average + fixed interval”.

Changes:

  • Add multiplier: float = 1.0 to AverageRuntime deadline references (SDK authoring, core evaluation, and serialized evaluation) and include it in (de)serialization.
  • Apply the multiplier during runtime evaluation and expand logging to include scaled runtime.
  • Add unit tests and documentation updates covering multiplier behavior and defaults.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
task-sdk/src/airflow/sdk/definitions/deadline.py Adds multiplier to SDK reference object and serialization payload.
airflow-core/src/airflow/models/deadline.py Applies multiplier in core runtime evaluation and includes it in (de)serialization.
airflow-core/src/airflow/serialization/definitions/deadline.py Applies multiplier in serialized evaluation path and includes it in (de)serialization.
airflow-core/tests/unit/models/test_deadline.py Adds tests for multiplier behavior, default behavior, and validation.
airflow-core/docs/howto/deadline-alerts.rst Documents the new multiplier parameter and adds usage examples.

Comment thread task-sdk/src/airflow/sdk/definitions/deadline.py Outdated
Comment thread airflow-core/src/airflow/models/deadline.py Outdated
Comment thread airflow-core/src/airflow/serialization/definitions/deadline.py Outdated
Comment thread airflow-core/docs/howto/deadline-alerts.rst
@haseebmalik18 haseebmalik18 force-pushed the add-multiplier-to-average-runtime-deadline branch from 7dda312 to 40e8ae2 Compare April 13, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Deadline Alerts] Implement a multiplier to the Average Runtime reference

3 participants