-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Integrate Sync Stack on KV Keys #30162
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
Conversation
| /** | ||
| * An HTTP Client that helps in providing assertions for invoking http client implementations. | ||
| */ | ||
| public final class AssertingClient implements HttpClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Temporarily added, will be removed before merging.
| /** | ||
| * HTTP client builder that helps in running sync and async assertion checks. | ||
| */ | ||
| public class AssertingHttpClientBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporarily added, will be removed before merging.
|
API change check APIView has identified API level changes in this PR and created following API reviews. |
kasobol-msft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
...-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java
Outdated
Show resolved
Hide resolved
| * @see PagedFlux | ||
| */ | ||
| @ServiceClient(builder = KeyClientBuilder.class, isAsync = true, serviceInterfaces = KeyService.class) | ||
| @ServiceClient(builder = KeyClientBuilder.class, isAsync = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should continue providing serviceInterfaces = <the interface RestProxy uses>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use service interface that's in impl package here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do that here
Line 35 in 639bff3
| @ServiceClient(builder = AnomalyDetectorClientBuilder.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should continue providing
serviceInterfaces = <the interface RestProxy uses>
I think we need that in the <service> interface class.
...-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/azure/security/keyvault/keys/implementation/KeyVaultErrorCodeStrings.java
Outdated
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Outdated
Show resolved
Hide resolved
| * @see PagedFlux | ||
| */ | ||
| @ServiceClient(builder = KeyClientBuilder.class, isAsync = true, serviceInterfaces = KeyService.class) | ||
| @ServiceClient(builder = KeyClientBuilder.class, isAsync = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should continue providing
serviceInterfaces = <the interface RestProxy uses>
I think we need that in the <service> interface class.
...re-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java
Outdated
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Outdated
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Show resolved
Hide resolved
...yvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/KeyClientImpl.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/azure/security/keyvault/keys/implementation/KeyVaultErrorCodeStrings.java
Outdated
Show resolved
Hide resolved
…nd importKeyWithResponseAsync().
…ved them from all async methods.
…Applied formatting fixes.
| } | ||
| } | ||
|
|
||
| private HttpClient buildAsyncAssertingClient(HttpClient httpClient) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't skip these tests. We want to make sure things are still working well with the current implementation. Can we get away with not using AssertingHttpClientBuilder until polling and paging are supported?
| serviceVersion)); | ||
| } | ||
|
|
||
| private HttpClient buildSyncAssertingClient(HttpClient httpClient) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't skip these tests. We want to make sure things are still working well with the current implementation. Can we get away with not using AssertingHttpClientBuilder until polling and paging are supported?
| HttpPipeline httpPipeline = getHttpPipeline(httpClient, testTenantId); | ||
| HttpPipeline httpPipeline = getHttpPipeline(buildSyncAssertingClient(httpClient == null | ||
| ? interceptorManager.getPlaybackClient() : httpClient), testTenantId); | ||
| KeyAsyncClient asyncClient = spy(new KeyClientBuilder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this instance of KeyAsyncClient as it won't be used any longer. We should then use the spy() and when() methods on the KeyClientImpl from below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding comment to request changes.
| HttpPipeline httpPipeline = getHttpPipeline(httpClient, testTenantId); | ||
| HttpPipeline httpPipeline = getHttpPipeline(buildSyncAssertingClient(httpClient == null | ||
| ? interceptorManager.getPlaybackClient() : httpClient), testTenantId); | ||
| KeyAsyncClient asyncClient = spy(new KeyClientBuilder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding comment to request changes.
Integrate Sync Stack on KV Keys SDK.
Polling and Paging APIs will be syncified later.
Cryptography Client being syncified in next PR.
Enabled Sync Rest Proxy by default.