Repository navigation
Fix branch not skipping mapped tasks with custom XCom backend - #68954
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
|
Please provide evidance of before and after images of a running dag with the setup of custom backend. |
|
Before/after on a running dag with a value-externalizing custom XCom backend. Setup (Breeze, SQLite). The built-in object-storage backend with the threshold set to AIRFLOW__CORE__XCOM_BACKEND=airflow.providers.common.io.xcom.backend.XComObjectStorageBackend The branch skips Cleared task — before vs afterWithout the fix the cleared task runs (Try 1); with the fix it stays skipped (Try 0). Task log — before vs after |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
|
Hey @potiuk @eladkal @amoghrajesh, This PR got closed by the stale bot, no review was ever left on it. It's been marked ready for maintainer review since Jul 8. Would you be able to reopen and review the solution whenever you get a chance? |
kaxil
left a comment
There was a problem hiding this comment.
Verified locally: the new test fails on main (the pointer string ends up in the DB and the mapped downstream runs) and passes with the fix. Thanks for the before/after evidence.
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |




When a custom XCom backend stores values externally (e.g. in S3), a branch operator stops skipping some of its downstream tasks on Airflow 3 — specifically dynamically-mapped tasks and tasks that are cleared and re-run.
Why: the branch records its skip decision as an XCom, and that XCom is pushed through your custom backend, which only persists a pointer to the real value. The scheduler reads that XCom as plain JSON to decide what to skip, can't interpret the pointer, and lets the task run instead of skipping it. It's the same root cause as the original 2.10.5
NoCredentialsError— on Airflow 3 the scheduler no longer calls the backend, so the crash turned into a silent skip failure.Fix: keep the skip decision out of the custom backend. It's now stored in the same plain form Airflow uses by default, so the scheduler can always read it. Nothing changes when no custom backend is configured, and there's no Execution API change.
Added a regression test that runs a real branch operator with an externalizing backend configured — it fails before this change and passes after.
Separate from #52219, which was a different skip bug already fixed in #53455.
closes: #50491
Was generative AI tooling used to co-author this PR?