bugraoz93 commented on code in PR #65099:
URL: https://github.com/apache/airflow/pull/65099#discussion_r3070145930
##########
airflow-ctl/src/airflowctl/api/client.py:
##########
@@ -294,8 +294,9 @@ def load(self) -> Credentials:
raise AirflowCtlKeyringException("Keyring backend
is not available") from e
self.api_token = None
except FileNotFoundError:
- # This is expected during the auth login command
- if self.client_kind != ClientKind.AUTH:
+ # This is expected during the auth login command.
+ # Also allow token-only usage without local config (for commands
like `version --remote`).
+ if self.client_kind != ClientKind.AUTH and self.api_token is None:
Review Comment:
I think this can be None in some cases.
How about we do something like this and eliminate auth kind for version
fully as well as --remote which version should already respond without auth
Here I have added NO_AUTH
https://github.com/apache/airflow/pull/61822/changes#diff-6c1e70e5894d838261bf4f502f2f117eed5e35dfcaa211f4e2b1070d632fda02R94
Then setting correct path and cascade to credentials in the same file. That
would also enable similar cases in the future. You can find all corrolated
changes there. There are some more with schema management but you can ignore
all. In version command when call with not auth we can skip auth for all rather
changing the behavior when we actually auth.
That could break things. What do you think?
--
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]