sdhilip200 opened a new pull request, #68789: URL: https://github.com/apache/airflow/pull/68789
When `BaseXCom.get_value()` is called outside a task-runner context, such as from plugin extra links resolved by the API server, `BaseXCom.get_one()` attempted to import `SUPERVISOR_COMMS` and raised `ImportError` before it could read the stored XCom value.\n\nThis changes sync `BaseXCom.get_one()` to keep using supervisor comms when they are available, and to fall back to reading the matching XCom row from the metadata database when no supervisor comms are present. The fallback uses `XComModel.deserialize_value()` so DB-backed values are decoded consistently with the model path.\n\ncloses: #59093\n\nTests:\n- `uv run pytest airflow-core/tests/unit/models/test_xcom.py::TestXComGet::test_basexcom_get_value_reads_from_db_without_supervisor_comms`\n- `uv run pytest airflow-core/tests/unit/models/test_xcom.py::TestXComGet`\n- `uv run pytest task-sdk/tests/task_sdk/bases/test_xcom.py`\n- `uv run pytest airflow-core/tests/unit/models/test_xcom.py`\n- `uv run ruff check task-sdk/src/airf low/sdk/bases/xcom.py airflow-core/tests/unit/models/test_xcom.py`\n- `uv run ruff format --check task-sdk/src/airflow/sdk/bases/xcom.py airflow-core/tests/unit/models/test_xcom.py`\n\n---\n\n##### Was generative AI tooling used to co-author this PR?\n\n- [X] Yes: OpenAI Codex\n\nGenerated-by: OpenAI Codex following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions -- 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]
