Skip to content

Fix XCom query in not_previously_skipped_dep to use xcom_entity - #74377

Merged
potiuk merged 2 commits into
apache:mainfrom
aaron-y-chen:fix-mapped-group-skip-decisions-xcom-alias
Oct 7, 2026
Merged

potiuk merged 2 commits into
apache:mainfrom
aaron-y-chen:fix-mapped-group-skip-decisions-xcom-alias

Conversation

@aaron-y-chen

Copy link
Copy Markdown
Contributor

The scheduled canary on main (Tests (ARM) run) fails deterministically on every core test job and on static checks. This comes from two PRs merged on the same day that conflict without a merge conflict:

The base XComModel columns refer to the unfiltered projection, not the filtered alias. Projecting them with with_only_columns() and dropping the ordering removes the alias from the query, so every XCom row is read, whatever its run, Dag or key. A ShortCircuitOperator's boolean return_value then counts as a skip decision, and scheduling a task downstream of a short-circuit in a mapped task group fails with TypeError: argument of type 'bool' is not iterable. Outside the tests this also means one full XCom read per mapped task group per scheduling pass.

Reading the columns through xcom_entity(query) keeps the query on the filtered alias, as the other get_many() callers already do.


Error Msg:

    airflow-core/src/airflow/ti_deps/deps/not_previously_skipped_dep.py:181:37: `XComModel.task_id` is used directly in a SQLAlchemy query; read it through `xcom_entity(query).<column>` instead.
    airflow-core/src/airflow/ti_deps/deps/not_previously_skipped_dep.py:181:56: `XComModel.map_index` is used directly in a SQLAlchemy query; read it through `xcom_entity(query).<column>` instead.
    airflow-core/src/airflow/ti_deps/deps/not_previously_skipped_dep.py:181:77: `XComModel.value` is used directly in a SQLAlchemy query; read it through `xcom_entity(query).<column>` instead.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude Opus-5.5] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@aaron-y-chen
aaron-y-chen marked this pull request as ready for review October 6, 2026 23:00

@yuseok89 yuseok89 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the quick fix!

@potiuk
potiuk merged commit 2288ea4 into apache:main Oct 7, 2026
79 checks passed
@potiuk

potiuk commented Oct 7, 2026

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants