sealmove commented on code in PR #56043:
URL: https://github.com/apache/airflow/pull/56043#discussion_r2381197689


##########
providers/docker/src/airflow/providers/docker/operators/docker_swarm.py:
##########
@@ -218,9 +218,8 @@ def _run_service(self) -> None:
         if self.service and self._service_status() == "complete":
             self.tasks = self.cli.tasks(filters={"service": 
self.service["ID"]})
             for task in self.tasks:
-                container_id = task["Status"]["ContainerStatus"]["ContainerID"]
-                container = self.cli.inspect_container(container_id)
-                self.containers.append(container)
+                docker_service = self.cli.inspect_service(task["ServiceID"])
+                self.containers.append(docker_service)

Review Comment:
   Hello, thank you for picking up the MR.
   
   What kind of combatibility are we trying to achieve? Unless I am missing 
something, I would say that `inspect_container()` is _wrong_ in general because 
it works only in 1-node deployments. I don't see why/when `ServiceID` is not 
available, since we are working with services specifically, which is the 
fundamental resource of Docker Swarm.



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