You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/06/29 15:24:19 UTC

[GitHub] [airflow] fhoda commented on a change in pull request #16404: Secrets backend failover

fhoda commented on a change in pull request #16404:
URL: https://github.com/apache/airflow/pull/16404#discussion_r660727668



##########
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):

Review comment:
       This one is narrow because it is specifically for GCP Secrets Manager, while the others are implemented at at higher level and thus have to account for all alternative secrets backends including custom built ones.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org