rodrigocollavo commented on issue #19251:
URL: https://github.com/apache/airflow/issues/19251#issuecomment-1346555989

   The code above forces us to use a specific prefix for secret names, and the 
secret manager will be ignored completely if the prefix is not present. That is 
a problem for existing secret that are not following this name convention.
   
   There's a commit already in the main branch with a fix to use a debug log 
instead of error, https://github.com/apache/airflow/pull/27856
   
   Meanwhile, for those waiting a new Airflow version or those who can't update 
to a newer version yet, I found a different and simpler approach to mute the 
log directly and keep using exactly the same functionality as before.
   
   ```
   from typing import Optional
   import logging
   
   from airflow.providers.google.cloud.secrets.secret_manager import 
CloudSecretManagerBackend
   
   
   class CustomCloudSecretManagerBackend(CloudSecretManagerBackend):
       def __init__(self, **kwargs):
           super().__init__(**kwargs)
           #disable secret manager client logs (only used for reporting secret 
not found or permission denied)
           self.client.log.setLevel(logging.CRITICAL)
   ```


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