You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@aritra24 On a second thought, to keep the logs for users on the ctl side, not on the api side, we can create a base method for ActionCommand and check if credential exists. We can call the Credentials method to check_if_exist new one to check without loading the credentials. We should also check if it expires to warn, but that can be another issue. What do you think?
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?
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?
@aritra24 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.
Activity
bugraoz93 commentedon Apr 12, 2025
@aritra24 On a second thought, to keep the logs for users on the
ctlside, not on theapiside, we can create a base method forActionCommandand check if credential exists. We can call theCredentialsmethod tocheck_if_existnew one to check without loading the credentials. We should also check if it expires to warn, but that can be another issue. What do you think?aritra24 commentedon Apr 12, 2025
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?
Prab-27 commentedon Apr 13, 2025
@bugrao, are you referring to providing a warning about token expiration? If so, I'd like to work on that issue. Could you please assign it to me?
cc: @aritra24
aritra24 commentedon Apr 13, 2025
Hi @Prab-27, I'm already looking into this one so you can try picking up some other tasks...
Prab-27 commentedon Apr 13, 2025
I understand the different issues related to this matter, and that’s why I asked for clarification.
Apologies for any confusion caused
bugraoz93 commentedon Apr 13, 2025
@aritra24 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 loginnever 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.bugraoz93 commentedon Apr 13, 2025
Thanks a lot @Prab-27 for your interest! I will ping you in case there will be an issue.