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/01/20 16:12:34 UTC

[GitHub] [airflow] ashb commented on a change in pull request #20980: Add `--map-index` parameter to task CLI commands

ashb commented on a change in pull request #20980:
URL: https://github.com/apache/airflow/pull/20980#discussion_r788921126



##########
File path: airflow/models/dagrun.py
##########
@@ -440,7 +440,13 @@ def get_task_instances(
         return tis.all()
 
     @provide_session
-    def get_task_instance(self, task_id: str, session: Session = NEW_SESSION) -> Optional[TI]:
+    def get_task_instance(
+        self,
+        task_id: str,
+        session: Session = NEW_SESSION,
+        *,
+        map_index: int = -1,
+    ) -> Optional[TI]:

Review comment:
       See my next PR for this (coming "soon"-ish) and we can discuss it there.
   
   I thought about this but I _think_ have the unmapped TI be REMOVED will make the API harder to consume than simply removing/updating it to index 0.




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