AP24110011695 opened a new pull request, #77136:
URL: https://github.com/apache/airflow/pull/77136
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->
## What's changed
The set-side gate skips the XCom backend for keys whose rows readers consume
as they are: the skip decision key (`is_stored_through_backend`, #50491) and
operator extra links (`_is_extra_link`, `_link_*`). The get-side gate only
asked whether a backend is configured — it never checked the key. So with a
custom XCom backend configured, a runtime reading such a key back (a downstream
task pulling a `_link_` key, for example) sent the **raw row value** to the
backend's `load` hook — a value that was never externalized, which a backend
that cannot load foreign values turns into `XCOM_BACKEND_ERROR` (or worse,
silently resolves to garbage).
This gives `_is_loaded_through_backend` the requested key and mirrors the
set-side exclusions, so a get of a key that bypassed the backend on set returns
the row value as it is. The three get handlers (`GetXCom`,
`GetXComSequenceItem`, `GetXComSequenceSlice`) all go through the same
predicate.
## Test
Three tests in the existing `TestPopenActivitySubprocessXComBackend`
harness, mirroring the set-side `test_set_xcom_sends_the_value_as_it_is`
parametrization (`skipmixin_key`, `_link_TriggerDagRunLink`): each asserts the
row value is returned as it is **and** `proc._xcom_backend.calls == []`.
Verified failing-first locally: pre-fix the backend records a `load` call
for both excluded keys; post-fix the calls list stays empty and all 25
pre-existing tests in the class still pass. (14 setup errors in the class are
pre-existing in this Windows environment — they reproduce without this diff; CI
runs them with the real environment.)
AI disclosure: drafted with AI assistance, verified locally by running the
failing-first cycle against the coordinator test harness.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]