uranusjr commented on code in PR #27898:
URL: https://github.com/apache/airflow/pull/27898#discussion_r1031920687


##########
airflow/models/taskinstance.py:
##########
@@ -719,6 +719,7 @@ def current_state(self, session: Session = NEW_SESSION) -> 
str:
             .filter(
                 TaskInstance.dag_id == self.dag_id,
                 TaskInstance.task_id == self.task_id,
+                TaskInstance.map_index == self.map_index,

Review Comment:
   Honestly `current_state` isn’t really used almost anywhere in the code base 
(the only is for `airflow tasks state`, but I’d challenge even that usage is 
not necessary at all), so the test coverage is mostly non-existent. You can 
probably add a test for the `airflow tasks` CLI command (in 
`tests/cli/commands/test_task_command.py`) to cover this.



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

Reply via email to