vincbeck commented on code in PR #43724:
URL: https://github.com/apache/airflow/pull/43724#discussion_r1831173187


##########
providers/src/airflow/providers/amazon/aws/operators/ecs.py:
##########
@@ -661,7 +661,9 @@ def _aws_logs_enabled(self):
         return self.awslogs_group and self.awslogs_stream_prefix
 
     def _get_logs_stream_name(self) -> str:
-        return 
f"{self.awslogs_stream_prefix}/{self.container_name}/{self._get_ecs_task_id(self.arn)}"
+        if self.awslogs_stream_prefix and self.container_name and not 
self.awslogs_stream_prefix.endswith(self.container_name):
+                return 
f"{self.awslogs_stream_prefix}/{self.container_name}/{self._get_ecs_task_id(self.arn)}"

Review Comment:
   Fair enough. I think you are right. Though, I think you have an indentation 
issue on the return level, please remove one



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