paolo-moriello commented on code in PR #42361:
URL: https://github.com/apache/airflow/pull/42361#discussion_r1769525437
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -675,6 +677,8 @@ def await_pod_completion(self, pod: k8s.V1Pod):
"Failed to check container status due to permission error.
Refreshing credentials and retrying."
)
self._refresh_cached_properties()
+ self.pod_manager.read_pod(pod=pod) # attempt using refreshed
credentials, raises if still invalid
Review Comment:
I want to make sure that we can also exit this function if credentials are
invalid also after the refresh.
without the `stop_after_attempt` we'd basically loop forever in case of
401s, which I want to prevent because it can still happen that credentials are
invalid at some point. by trying to `read_pod` inside the except we'll re-raise
if credentials are invalid
--
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]