You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "darshil929 (via GitHub)" <gi...@apache.org> on 2026/06/24 19:50:00 UTC
[PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
darshil929 opened a new pull request, #68954:
URL: https://github.com/apache/airflow/pull/68954
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?
- [X] Yes — claude sonnet 4.6
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #68954:
URL: https://github.com/apache/airflow/pull/68954#issuecomment-4793062754
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](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example Dag that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #68954:
URL: https://github.com/apache/airflow/pull/68954#issuecomment-4796984989
Please provide evidance of before and after images of a running dag with the setup of custom backend.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #68954:
URL: https://github.com/apache/airflow/pull/68954#issuecomment-5472246817
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.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "darshil929 (via GitHub)" <gi...@apache.org>.
darshil929 commented on PR #68954:
URL: https://github.com/apache/airflow/pull/68954#issuecomment-4822221430
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 `0`, so every value, including the branch decision is externalized to a reference instead of stored inline:
AIRFLOW__CORE__XCOM_BACKEND=airflow.providers.common.io.xcom.backend.XComObjectStorageBackend
AIRFLOW__COMMON_IO__XCOM_OBJECTSTORAGE_PATH=file:///files/xcoms
AIRFLOW__COMMON_IO__XCOM_OBJECTSTORAGE_THRESHOLD=0
The branch skips `should_be_skipped` directly on the worker on the first run, so the regression only surfaces once the scheduler re-evaluates the skip via `NotPreviouslySkippedDep` i.e. after the task is cleared. So each run is triggered, then `should_be_skipped` is cleared.
#### Cleared task — before vs after
Without the fix the cleared task **runs** (Try 1); with the fix it **stays skipped** (Try 0).
Before — no fix:
<img width="2000" height="1299" alt="image" src="https://github.com/user-attachments/assets/c9651b4e-3932-4190-860b-f092d48c087d" />
After — with fix:
<img width="1280" height="831" alt="image" src="https://github.com/user-attachments/assets/e29fc1e4-3f75-4405-97b4-acd771851d8b" />
#### Task log — before vs after
Before — no fix (body executed):
<img width="2000" height="1299" alt="image" src="https://github.com/user-attachments/assets/71576645-244b-49c8-af21-b486f15e71aa" />
After — with fix (task was skipped):
<img width="2000" height="1299" alt="image" src="https://github.com/user-attachments/assets/988c5917-a7e1-41ba-88b6-45f3a595a55f" />
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #68954:
URL: https://github.com/apache/airflow/pull/68954
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "darshil929 (via GitHub)" <gi...@apache.org>.
darshil929 commented on PR #68954:
URL: https://github.com/apache/airflow/pull/68954#issuecomment-5560644289
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?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #68954: Fix branch not skipping mapped tasks with custom XCom backend
URL: https://github.com/apache/airflow/pull/68954
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix branch not skipping mapped tasks with custom XCom backend [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #68954:
URL: https://github.com/apache/airflow/pull/68954#issuecomment-5760067552
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional 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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org