Repository navigation
[v3-4-test] Decode deadline callback kwargs where the callback runs (#74830) - #75114
Merged
Merged
Conversation
…74830) * Decode deadline callback kwargs where the callback runs Deadline Alert callback kwargs were decoded in the scheduler and the API server whenever deadline alerts were loaded, although neither component calls the callback. Keep the kwargs serde-encoded on the server and decode them where they are used: the triggerer decodes AsyncCallback kwargs with its existing pipeline, and the callback subprocess decodes SyncCallback kwargs right before calling the user callable. Executor callback data now carries a "kwargs_encoding" marker so the worker only decodes encoded kwargs, callbacks created before upgrade run unchanged, and an older Task SDK fails such callbacks instead of passing encoded arguments. The runtime-provided callback context is serialized strictly, as before; only the stored callback kwargs keep their encoded form. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Render deadline callback kwargs readably in metrics and repr Deadline callback kwargs are now kept in their encoded form, so metric tags and the callback repr showed the raw encoding instead of the values. Show them in a readable form again, without importing or building anything they name. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Keep deadline callback kwargs display total for non-finite intervals A timedelta payload holding NaN made the display of callback kwargs raise, which would escape from metric emission and the callback repr. Show such values, and any other interval that cannot be built, in the generic form instead. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Assert that the deadline context never reaches the triggerer, not how it is refused The triggerer-path deadline test pinned the AttributeError raised by strict serialization. Assert the outcome instead (no trigger is created and nothing in the context is constructed), so the test holds whether the context is refused by raising or by failing the callback. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Fail only the affected trigger when its kwargs cannot be decoded (cherry picked from commit 233f9c3) Co-authored-by: Jarek Potiuk <jarek@potiuk.com> Generated-by: Claude Opus 5
1 task done
potiuk
marked this pull request as ready for review
October 19, 2026 16:46
potiuk
requested review from
XD-DENG,
amoghrajesh,
ashb,
bolkedebruin,
dheerajturaga,
dstandish,
hussein-awala,
o-nikolas and
pierrejeambrun
as code owners
October 19, 2026 16:46
Contributor
Author
|
Hi maintainer, this PR was merged without a milestone set.
|
vatsrahul1001
pushed a commit
that referenced
this pull request
Oct 20, 2026
…74830) (#75114) * Decode deadline callback kwargs where the callback runs Deadline Alert callback kwargs were decoded in the scheduler and the API server whenever deadline alerts were loaded, although neither component calls the callback. Keep the kwargs serde-encoded on the server and decode them where they are used: the triggerer decodes AsyncCallback kwargs with its existing pipeline, and the callback subprocess decodes SyncCallback kwargs right before calling the user callable. Executor callback data now carries a "kwargs_encoding" marker so the worker only decodes encoded kwargs, callbacks created before upgrade run unchanged, and an older Task SDK fails such callbacks instead of passing encoded arguments. The runtime-provided callback context is serialized strictly, as before; only the stored callback kwargs keep their encoded form. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Render deadline callback kwargs readably in metrics and repr Deadline callback kwargs are now kept in their encoded form, so metric tags and the callback repr showed the raw encoding instead of the values. Show them in a readable form again, without importing or building anything they name. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Keep deadline callback kwargs display total for non-finite intervals A timedelta payload holding NaN made the display of callback kwargs raise, which would escape from metric emission and the callback repr. Show such values, and any other interval that cannot be built, in the generic form instead. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Assert that the deadline context never reaches the triggerer, not how it is refused The triggerer-path deadline test pinned the AttributeError raised by strict serialization. Assert the outcome instead (no trigger is created and nothing in the context is constructed), so the test holds whether the context is refused by raising or by failing the callback. Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions * Fail only the affected trigger when its kwargs cannot be decoded (cherry picked from commit 233f9c3) Generated-by: Claude Opus 5 Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
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.
Deadline Alert callback kwargs were decoded in the scheduler and the API
server whenever deadline alerts were loaded, although neither component
calls the callback. Keep the kwargs serde-encoded on the server and
decode them where they are used: the triggerer decodes AsyncCallback
kwargs with its existing pipeline, and the callback subprocess decodes
SyncCallback kwargs right before calling the user callable.
Executor callback data now carries a "kwargs_encoding" marker so the
worker only decodes encoded kwargs, callbacks created before upgrade run
unchanged, and an older Task SDK fails such callbacks instead of passing
encoded arguments.
The runtime-provided callback context is serialized strictly, as before;
only the stored callback kwargs keep their encoded form.
Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
Deadline callback kwargs are now kept in their encoded form, so metric tags and the callback repr showed the raw encoding instead of the values. Show them in a readable form again, without importing or building anything they name.
Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
A timedelta payload holding NaN made the display of callback kwargs raise, which would escape from metric emission and the callback repr. Show such values, and any other interval that cannot be built, in the generic form instead.
Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
The triggerer-path deadline test pinned the AttributeError raised by
strict serialization. Assert the outcome instead (no trigger is created
and nothing in the context is constructed), so the test holds whether
the context is refused by raising or by failing the callback.
Generated-by: Claude Opus 5 following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
(cherry picked from commit 233f9c3)
Co-authored-by: Jarek Potiuk jarek@potiuk.com
Generated-by: Claude Opus 5