Add multiplier parameter to AverageRuntimeDeadline #63853#63904
Open
haseebmalik18 wants to merge 4 commits intoapache:mainfrom
Open
Add multiplier parameter to AverageRuntimeDeadline #63853#63904haseebmalik18 wants to merge 4 commits intoapache:mainfrom
haseebmalik18 wants to merge 4 commits intoapache:mainfrom
Conversation
531bc80 to
9a9d04a
Compare
Contributor
There was a problem hiding this comment.
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.0to 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. |
7dda312 to
40e8ae2
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.
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