Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic - Unify and complete configurations for all Azure Spring starters on top of Azure SDKs #23421

Closed
2 tasks done
Tracked by #23402
saragluna opened this issue Aug 9, 2021 · 1 comment
Closed
2 tasks done
Tracked by #23402
Assignees
Labels
azure-spring All azure-spring related issues Client This issue points to a problem in the data-plane of the library. Epic

Comments

@saragluna
Copy link
Member

saragluna commented Aug 9, 2021

This epic is used to track configuration-related issues for Azure Spring starters. The goal is to make configurations exposed by all our starters consistent and complete.

Existing Problems in Azure Spring Starters:

  1. Azure SDKs have their own configurations when creating the client builder; we should support all the configurations.
  2. The configurations exposed in Azure Spring starters are not consistent, for example:
  3. The auto-configuration class could be as simple as possible; we should develop a common auto-configuration framework to make implementing point-1 and point-2 easy.
    • Azure SDK has a clear programmatic pattern, the azure-core + azure-identity, and all azure SDKs are built on top of them. We don't have such layers defined, and without a skeleton, the auto-configuration classes are not extendable.

Design Goal

  1. The starters shouldn't block customers from configuring any SDK-supported features, e.g., authentication methods, HTTP/AMQP options.
  2. Customers use a consistent way to override the opinionated auto-configuration we provide.
  3. A more Spring native way to configure, for example:
    • Accept RetryTemplate as the retry in Azure SDKs.
    • Logging.
  4. Support well-defined Azure environments. Some Azure services define some well-known environments, and the starters should pick them up:
    • AZURE_KEYVAULT_ENDPOINT
  5. We define a common framework to support all the Azure SDK client configurations to simplify all Azure SDK clients' instantiation process.
    • Adding new service support should be as simple as implementing a bunch of interfaces.

Solution Analysis

Azure SDK client builder pattern

All azure SDKs use a builder to configure options of different kinds, HTTP, AMQP, retry, etc., and then buildClient() or buildAsyncClient().

Service Configurations
Authentication
Retry Options
HTTP | AMQP
Client Options
Configuration (Environment)

Configurations could be divide into the below categories:

Category Description
Service Configurations Sevice specific configurations, such as customerProvidedKey in BlobClientBuilder, consumerGroup in EventHubClientBuilder.
Authentication Authntication methods, such as credential(TokenCredential), credential(AzureNamedKeyCredential.
Retry Options Retry options, such as EventHubClientBuilder.retry(AmqpRetryOptions), BlobClientBuilder.retry(RequestRetryOptions), SecretClientBuilder.retryPolicy(RetryPolicy).
HTTP | AMQP Protocal related options, such as httpClient(HttpClient), httpPipeline(HttpPipeline), ServiceBusClientBuilder.proxyOptions(ProxyOptions).
Client Options Configuration options for clients, such as applicationId, HTTP headers, and HTTP proxy options.
Configuration (Environment) Passing a Configuration to client builders will give them the ability to read property value from system environment or properties, such as HTTP_PROXY, HTTPS_PROXY, etc.

Azure Spring Cloud Core

@saragluna saragluna added Client This issue points to a problem in the data-plane of the library. azure-spring All azure-spring related issues labels Aug 9, 2021
@saragluna saragluna added this to the [2021] September milestone Aug 9, 2021
@saragluna saragluna self-assigned this Aug 9, 2021
@saragluna saragluna added the Epic label Aug 9, 2021
@saragluna saragluna changed the title Epic - Unify and complete configurations for all Azure Spring starters Epic - Unify and complete configurations for all Azure Spring starters on top of Azure SDKs Aug 9, 2021
@saragluna
Copy link
Member Author

Closing this in favor of #23402.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues Client This issue points to a problem in the data-plane of the library. Epic
Projects
Archived in project
Development

No branches or pull requests

2 participants