Skip to content

all_done trigger rule goes upstream_failed when mapped inputs are all skipped #51320

Closed

Description

@collinmcnulty

Apache Airflow version

3.0.1

If "Other Airflow 2 version" selected, which one?

No response

What happened?

A DAG is being marked failed despite all tasks that should be skipped. This only happens when trigger_rule is all_done

What you think should happen instead?

Mapped task should be skipped, not upstream failed.

How to reproduce

This DAG has all tasks skip in Airflow 2, so the DAG state is success. In Airflow 3, it has one task upstream_failed and therefore the DAG as a whole is marked failed.

from airflow.exceptions import AirflowSkipException
from airflow.decorators import dag, task


@dag(
    start_date=None,
    schedule=None,
)
def upstream_skipper():
    @task()
    def skip(**context) -> int:
        raise AirflowSkipException()

    @task(trigger_rule="all_done")
    def consume_skip_all_done(value) -> None:
        """Fails as upstream skipped"""
        print(value)

    @task()
    def consume_skip_all_success(value) -> None:
        """Skipped"""
        print(value)

    consume_skip_all_success.expand(value=skip())
    consume_skip_all_done.expand(value=skip())


upstream_skipper()

Operating System

Debian GNU/Linux 12 (bookworm)

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Jun 2, 2025
  2. added
    priority:high
    on Jun 2, 2025
  3. collinmcnulty commented on Jun 2, 2025

    @collinmcnulty
    ContributorAuthor

    This also applies to none_failed

  4. added
    affected_version:3.0
    and removed
    needs-triage
    on Jul 19, 2025
  5. aayushbisen commented on Jul 25, 2025

    @aayushbisen
    Contributor

    Hey I was able to reproduce the issue in local env and understand the expected behaviour mentioned in the #53667 .

    I want to help with the issue can I start looking at potential solutions or workarounds for this issue?

  6. gopidesupavan commented on Sep 11, 2025

    @gopidesupavan
    Member
    Image

    @collinmcnulty looks like it resolved are you happy to close this? can you please check.

  7. phanikumv commented on Oct 23, 2025

    @phanikumv
    Contributor

    @atul-astronomer @vatsrahul1001 can we do one final round of testing to evaluate whether the issue still exists ?

  8. atuls4441 commented on Oct 24, 2025

    @atuls4441
    Contributor

    Tested with 3.1.1rc2, works fine.

  9. phanikumv commented on Oct 24, 2025

    @phanikumv
    Contributor

    Closing as per above comment, please reopen in case of issues.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected_version:3.0area:corearea:dynamic-task-mappingkind:bugpriority:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions