-
Notifications
You must be signed in to change notification settings - Fork 0
Description
| cred: Any = DefaultAzureCredential() |
If i want to fetch 10 secrets for my configuration, using this utility function with dataorc-utils will create a new instance of DefaultAzureCredential and AzureAppConfigurationClient.
Not sure how helpful is using this utility instead of manually creating one instance
credential = DefaultAzureCredential()
ac_client = AzureAppConfigurationClient(
base_url=e("APP_CONFIG_ENDPOINT"),
credential=credential,
)
Especially if we will very likely also require credentials instance in our code anyway for other purposes not covered in dataorc-utils
This function essencialy wraps class initialization, and exposes output from one of their methods.
Utilities or wrapper functions obfuscate code, especially if they do not bring any meaninful functionality.
I think we should have stronger constraints on what can be a dataorc-utils utility function.
For this case we should add at least some meaningfull funcitonality, either client factory, so those can be reused, or dependency injection whre the helper will accept overrides for credentials/kv.
Also this promis is not implemented:
| The helpers use the Azure SDK when available and fall back to environment |