Fix TimeSensor start_from_trigger causing dag_version churn - #69610
Open
bramhanandlingala wants to merge 6 commits into
Open
bramhanandlingala wants to merge 6 commits into
bramhanandlingala wants to merge 6 commits into
Conversation
Contributor
Author
|
Hi @bugraoz93, @choo121600, @ephraimbuddy, @henry3260, @jason810496, @rawwar @kaxil @Lee-W |
Closed
2 tasks
1 task
1 task
This comment was marked as spam.
This comment was marked as spam.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Sep 18, 2026
DayOfWeekSensor's xref in the standard provider's sensor guide pointed at the pre-provider-split airflow.sensors.weekday path, which no longer exists; the class now lives under airflow.providers.standard.sensors.weekday. BaseXCom's xref in the common.io XCom backend guide pointed at airflow.models.xcom.BaseXCom, which is a deprecated compat shim; the real class lives at airflow.sdk.bases.xcom.BaseXCom. The TimeSensor xref in the same sensor guide is also broken (points at a non-existent sensors.time_sensor module) but is left alone here since apache#69610, apache#69746, and apache#69925 are all open against that same paragraph.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Sep 18, 2026
DayOfWeekSensor's xref in the standard provider's sensor guide pointed at the pre-provider-split airflow.sensors.weekday path, which no longer exists; the class now lives under airflow.providers.standard.sensors.weekday. BaseXCom's xref in the common.io XCom backend guide pointed at airflow.models.xcom.BaseXCom, a deprecated compat shim. The task-sdk docs only expose it at the flat airflow.sdk.BaseXCom path (autoapiclass in task-sdk/docs/api.rst, autoapi_generate_api_docs=False elsewhere), matching the existing convention for this class of xref (e.g. airflow.sdk.ResumableJobMixin). The TimeSensor xref in the same sensor guide is also broken (points at a non-existent sensors.time_sensor module) but is left alone here since apache#69610, apache#69746, and apache#69925 are all open against that same paragraph.
kaxil
added a commit
that referenced
this pull request
Sep 19, 2026
DayOfWeekSensor's xref in the standard provider's sensor guide pointed at the pre-provider-split airflow.sensors.weekday path, which no longer exists; the class now lives under airflow.providers.standard.sensors.weekday. BaseXCom's xref in the common.io XCom backend guide pointed at airflow.models.xcom.BaseXCom, a deprecated compat shim. The task-sdk docs only expose it at the flat airflow.sdk.BaseXCom path (autoapiclass in task-sdk/docs/api.rst, autoapi_generate_api_docs=False elsewhere), matching the existing convention for this class of xref (e.g. airflow.sdk.ResumableJobMixin). The TimeSensor xref in the same sensor guide is also broken (points at a non-existent sensors.time_sensor module) but is left alone here since #69610, #69746, and #69925 are all open against that same paragraph.
This branch has not been deployed
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.
closes: #69543
TimeSensorcomputed its target time usingdatetime.now()at DAG-parsetime. When
start_from_trigger=True, this value got baked into theserialized DAG, causing the
dag_versionto change on every parse thatcrossed a day boundary.
This can't be fixed by computing the value differently, since the target
moment is inherently different each day but
start_trigger_argsis onlycomputed once per DAG version. So
start_from_trigger=Truenow raises aValueErrorinstead of silently producing a broken serialization.deferrable=Truestill works as before and is unaffected.Also fixed the docs, which incorrectly said the target time is evaluated
against
data_interval_end/run_after— it never was.Added a test for the new
ValueError; all existing tests still pass.Gen-AI disclosure: I used a generative AI tool to help identify the root
cause, write tests, and draft the PR description. I reviewed, tested, and
verified all changes locally before submitting.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude following the guidelines