dv-matthew-crown opened a new issue, #55225:
URL: https://github.com/apache/airflow/issues/55225
### Apache Airflow version
3.0.6
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
The short circuit operator does not skip mapped tasks when trigger rule is
set to none_failed and ignore_downstream_trigger_rules is set to True
### What you think should happen instead?
I would expect that mapped task instances would be skipped if the short
circuit task returns a False value, but instead they are executed
### How to reproduce
```from airflow.sdk import Asset, dag, task
a = Asset("test_tmp_dag")
b = Asset("test_tmp_dag2")
@dag(dag_id="test_tmp_dag", schedule=None, default_args={"trigger_rule":
"none_failed"})
def test_tmp_dag():
multi = [1,2,3]
@task.short_circuit(task_id="dummy1",
ignore_downstream_trigger_rules=True)
def dummy1():
if 2 == 2:
return False
else:
return "dummy1"
@task(task_id="dummy2")
def dummy2():
return "dummy2"
@task(task_id="dummy3")
def dummy3(x: int):
return f"dummy3-{x}"
@task(task_id="publish", outlets=[a,b])
def publish():
return "published"
d1 = dummy1()
d2 = dummy2()
d3 = dummy3.expand(x=multi)
p = publish()
# The result of the task function call is a Task object
d1 >> d2 >> d3 >> p
test_tmp_dag()
```
This dag demonstrates the problem - dummy2 and publish are correctly
skipped, but the mapped tasks in dummy3 are executed.
### Operating System
Ubuntu 24.04.2 LTS
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon==9.12.0
apache-airflow-providers-celery==3.12.2
apache-airflow-providers-common-compat==1.7.3
apache-airflow-providers-common-io==1.6.2
apache-airflow-providers-common-sql==1.27.5
apache-airflow-providers-http==5.3.3
apache-airflow-providers-postgres==6.2.3
apache-airflow-providers-smtp==2.2.0
apache-airflow-providers-standard==1.6.0
### Deployment
Docker-Compose
### 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
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]