uranusjr commented on a change in pull request #17264:
URL: https://github.com/apache/airflow/pull/17264#discussion_r678112809
##########
File path: airflow/providers/google/cloud/secrets/secret_manager.py
##########
@@ -101,9 +106,17 @@ def __init__(
"`connections_prefix`, `variables_prefix` and `sep` should
"
f"follows that pattern {SECRET_ID_PATTERN}"
)
- self.credentials, self.project_id = get_credentials_and_project_id(
- keyfile_dict=gcp_keyfile_dict, key_path=gcp_key_path,
scopes=gcp_scopes
- )
+ try:
+ self.credentials, self.project_id = get_credentials_and_project_id(
+ keyfile_dict=gcp_keyfile_dict, key_path=gcp_key_path,
scopes=gcp_scopes
+ )
+ except (DefaultCredentialsError, FileNotFoundError):
+ log.exception(
+ 'Unable to load credentials for GCP Secret Manager. '
+ 'Make sure that the keyfile path, dictionary, or
GOOGLE_APPLICATION_CREDENTIALS '
+ 'environment variable is correct and properly configured.'
Review comment:
Yes, but I was thinking it’d use useful to know what the value of
`self.key_path` is in the above context, so I don’t need to hunt the value in
my configs. But maybe google-auth already includes that in the exception, no
idea.
--
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]