bugraoz93 commented on issue #49139:
URL: https://github.com/apache/airflow/issues/49139#issuecomment-2800121252

   > Yeah, that makes sense. So to confirm we add a base method in 
actioncommand that calls credentials.check_if_exists before each command? Also 
I don't fully understand the without loading the credentials. Is there a 
specific reason to not load it except it'd ask for the password?
   
   As a concept, we are encapsulating the Client with embedded loaded 
credentials to each ActionCommand itself. This makes a functional Client in the 
methods. What we shouldn't do is load credentials on the CTL level (ctl package 
level 
https://github.com/apache/airflow/tree/main/airflow-ctl/src/airflowctl/ctl) 
without encapsulating them into the Client. That's why I offered the 
check_if_exists without actually loading the key but checking if the 
environment exists, which means `airflowctl auth login` never ran. If it exists 
but still getting an error for the expired token, that falls into the case of 
the token being expired. For that, we should do an additional check on the 
Client side while initialising so that somehow we can prevent being called by 
the command itself.
   


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