shahar1 commented on code in PR #46584:
URL: https://github.com/apache/airflow/pull/46584#discussion_r1976380983
##########
tests/ti_deps/deps/test_not_previously_skipped_dep.py:
##########
@@ -161,3 +167,34 @@ def test_parent_not_executed(session, dag_maker):
assert len(list(dep.get_dep_statuses(ti2, session, DepContext()))) == 0
assert dep.is_met(ti2, session)
assert ti2.state == State.NONE
+
+
[email protected]("condition, final_state", [(True,
TaskInstanceState.SUCCESS), (False, TaskInstanceState.SKIPPED)])
+def test_parent_is_mapped_short_circuit(session, dag_maker, condition,
final_state):
+ with dag_maker(schedule=None, session=session):
+
+ @task
+ def op1():
+ return [1, 2, 3]
+
+ @task.short_circuit
+ def op2(i: int):
+ return condition
+
+ @task
+ def op3(res: bool):
+ return res
+
+ op3.expand(res=op2.expand(i=op1()))
+
+ dr = dag_maker.create_dagrun()
+ ti1 = dr.get_task_instance(task_id="op1")
+ ti1.run()
+ dr.task_instance_scheduling_decisions()
+ ti2_0 = dr.get_task_instance(task_id="op2", map_index=0)
+ ti2_0.run() # FIXME: <- raises AttributeError: 'NoneType' object has no
attribute 'queue'
Review Comment:
@ash could you please help me out with figuring it out?
I tried to override the `queue` parameter in `op2` and run
`ti2_0.refresh_from_task(...)`, but it still raises this error.
--
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]