amoghrajesh commented on code in PR #31663:
URL: https://github.com/apache/airflow/pull/31663#discussion_r1212872788


##########
airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -398,15 +419,80 @@ def consume_logs(
                 )
                 time.sleep(1)
 
-    def await_container_completion(self, pod: V1Pod, container_name: str) -> 
None:
+    def fetch_requested_container_logs(
+        self, pod: V1Pod, container_logs: list[str] | str | bool, 
follow_logs=False
+    ) -> list[PodLoggingStatus]:
+        """
+        Follow the logs of containers in the pod specified by input parameter 
and publish
+        it to airflow logging. Returns when all the containers exit.
+        """
+        pod_logging_statuses = []
+        all_containers = self.get_container_names(pod)
+        if len(all_containers) == 0:
+            self.log.error("Could not retrieve containers for the pod: %s", 
pod.metadata.name)
+        else:
+            # if a list of containers are provided, iterate for every 
container in the pod
+            if type(container_logs) == list:

Review Comment:
   Makes sense. I need to change the docstrings accordingly for this too.
   Made the changes



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