Crowiant commented on code in PR #45931:
URL: https://github.com/apache/airflow/pull/45931#discussion_r3225057479
##########
task-sdk/src/airflow/sdk/configuration.py:
##########
@@ -221,8 +222,27 @@ def get_custom_secret_backend(worker_mode: bool = False):
return conf._get_custom_secret_backend(worker_mode=worker_mode)
+class Backends(Enum):
+ """Type of the secrets backend."""
+
+ ENVIRONMENT_VARIABLE = "environment_variable"
+ EXECUTION_API = "execution_api"
+ CUSTOM = "custom"
+ METASTORE = "metastore"
+
+
+def get_importable_secret_backend(class_name: str | None) -> Any | None:
+ """Get secret backend defined in the given class name."""
+ from airflow.sdk._shared.module_loading import import_string
+
+ if class_name is not None:
Review Comment:
Moved import_string at module scope
--
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]