You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/11 14:45:56 UTC

[GitHub] [airflow] kaxil commented on a diff in pull request #22909: Fix bug where dynamically mapped tasks got set to REMOVED

kaxil commented on code in PR #22909:
URL: https://github.com/apache/airflow/pull/22909#discussion_r847410390


##########
tests/models/test_dagrun.py:
##########
@@ -1036,14 +1036,17 @@ def test_mapped_mixed__literal_not_expanded_at_create(dag_maker, session):
         mapped = MockOperator.partial(task_id='task_2').expand(arg1=literal, arg2=XComArg(task))
 
     dr = dag_maker.create_dagrun()
-    indices = (
-        session.query(TI.map_index)
+    query = (
+        session.query(TI.map_index, TI.state)
         .filter_by(task_id=mapped.task_id, dag_id=mapped.dag_id, run_id=dr.run_id)
         .order_by(TI.map_index)
-        .all()
     )
 
-    assert indices == [(-1,)]
+    assert query.all() == [(-1, None)]
+
+    # Verify_integrity shouldn't change the restul now that the TIs exist

Review Comment:
   ```suggestion
       # Verify_integrity shouldn't change the result now that the TIs exist
   ```



-- 
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