moiseenkov commented on code in PR #45931:
URL: https://github.com/apache/airflow/pull/45931#discussion_r1925348243


##########
airflow/config_templates/config.yml:
##########
@@ -1296,6 +1296,15 @@ secrets:
       sensitive: true
       example: ~
       default: ""
+    backends_order:
+      description: |
+        Comma-separated list of secret backends. These backends will be used 
in the order they are specified.
+        Please note that the `environment_variable` and `metastore` are 
required values and cannot be removed
+        from the list. Supported values are: `custom`, `environment_variable`, 
`metastore`.
+      version_added: 2.10.5
+      type: string
+      example: ~
+      default: "custom,environment_variable,metastore"

Review Comment:
   Thanks for noticing that - I updated the documentation and the new option 
description.
   
   Speaking of breaking changes, I'm pretty sure that the default behavior is 
identical the current one, because the existing implementation used to check 
any custom backend first, and then load `EnvironmentVariablesBackend` and 
`MetastoreBackend`.
   
   ```python
   DEFAULT_SECRETS_SEARCH_PATH = [
       "airflow.secrets.environment_variables.EnvironmentVariablesBackend",
       "airflow.secrets.metastore.MetastoreBackend",
   ]
   
   ...
   
   def initialize_secrets_backends() -> list[BaseSecretsBackend]:
       ...
   
       backend_list = []
   
       custom_secret_backend = get_custom_secret_backend()
   
       if custom_secret_backend is not None:
           backend_list.append(custom_secret_backend)
   
       for class_name in DEFAULT_SECRETS_SEARCH_PATH:
           secrets_backend_cls = import_string(class_name)
           backend_list.append(secrets_backend_cls())
   
   return backend_list
   ```



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