HsiuChuanHsu commented on code in PR #54858:
URL: https://github.com/apache/airflow/pull/54858#discussion_r2299334295


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:
##########
@@ -735,18 +738,26 @@ def _flush_result_queue(self) -> None:
                 results = self.result_queue.get_nowait()
                 self.log.warning("Executor shutting down, flushing 
results=%s", results)
                 try:
-                    key, state, pod_name, namespace, resource_version, 
failure_details = results
                     self.log.info(
-                        "Changing state of %s to %s : resource_version=%d", 
results, state, resource_version
+                        "Changing state of %s to %s : resource_version=%s",
+                        results,
+                        results.state,
+                        results.resource_version,
                     )
                     try:
-                        self._change_state(key, state, pod_name, namespace, 
failure_details)
+                        self._change_state(
+                            results.key,
+                            results.state,
+                            results.pod_name,
+                            results.namespace,
+                            results.failure_details,
+                        )

Review Comment:
   Make sense! 
   Simplify the `_change_state` method's signature to a single 
KubernetesResults object. This change will make the code much easier to use and 
read.



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