Add SerializedVariableInterval for deadline alerts - #71802
Open
SameerMesiah97 wants to merge 2 commits into
Open
Add SerializedVariableInterval for deadline alerts#71802SameerMesiah97 wants to merge 2 commits into
SameerMesiah97 wants to merge 2 commits into
Conversation
SameerMesiah97
force-pushed
the
Deadline-Alerts-VariableInterval-Refinement
branch
from
August 18, 2026 21:28
f6df2e5 to
691497e
Compare
… deserialization no longer exposes SDK interval types. Move interval resolution from VariableInterval to its serialized counterpart and allow negative and zero values to preserve existing deadline offset semantics. Move the existing interval resolution tests to SerializedVariableInterval.
SameerMesiah97
force-pushed
the
Deadline-Alerts-VariableInterval-Refinement
branch
from
August 19, 2026 20:18
691497e to
7aa4ef0
Compare
SameerMesiah97
marked this pull request as ready for review
August 20, 2026 22:18
SameerMesiah97
requested review from
amoghrajesh,
ashb,
bolkedebruin and
kaxil
as code owners
August 20, 2026 22:18
SameerMesiah97
marked this pull request as draft
August 20, 2026 22:19
SameerMesiah97
marked this pull request as ready for review
August 20, 2026 22:19
Contributor
Author
|
Hopefully, this follow-up PR should address the concerns you raised on PR #64751. |
1 task
3 tasks
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.
Description
This change is a follow-up for PR #64751 that introduces a core-side
SerializedVariableIntervalrepresentation for dynamically configured deadline intervals.VariableIntervalremains the SDK-facing type used in DAG definitions, while deserialization converts it toSerializedVariableIntervalfor core deadline evaluation. Variable-backed interval resolution is moved to this serialized counterpart.Rationale
Deadline references already use dedicated serialized representations to maintain a separation between SDK and core types. Providing the same representation for
VariableIntervalprevents the SDK dataclass from propagating beyond the deserialization boundary and allows core deadline evaluation to operate on a dedicated core-side type.Notes
timedeltasemantics, where intervals represent offsets from the deadline reference and are not required to be positive.test_dagrun_deadline_variable_interval_stablehas been updated.Tests
Moved the existing
VariableInterval.resolve()tests toSerializedVariableInterval.resolve()to reflect that interval resolution is now performed by the core-side representation.The resolution tests cover valid Variable values, including zero and negative offsets, as well as missing and invalid Variable values.
Backwards Compatibility
VariableIntervalremains the SDK-facing type for configuring dynamic deadline intervals, so existing DAG definitions continue to work unchanged.The change only affects the internal representation after deserialization and where Variable-backed intervals are resolved. Existing
timedeltaintervals and serialized deadline behavior remain unchanged.