Skip to content

Conversation

@g2vinay
Copy link
Member

@g2vinay g2vinay commented Jul 27, 2022

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.

@ghost ghost added the KeyVault label Jul 27, 2022
/**
* An HTTP Client that helps in providing assertions for invoking http client implementations.
*/
public final class AssertingClient implements HttpClient {
Copy link
Member Author

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 {
Copy link
Member Author

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.

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-security-keyvault-keys

Copy link
Contributor

@kasobol-msft kasobol-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@g2vinay g2vinay requested a review from vcolin7 July 27, 2022 21:14
@g2vinay g2vinay marked this pull request as ready for review July 27, 2022 21:30
* @see PagedFlux
*/
@ServiceClient(builder = KeyClientBuilder.class, isAsync = true, serviceInterfaces = KeyService.class)
@ServiceClient(builder = KeyClientBuilder.class, isAsync = true)
Copy link
Member

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>

Copy link
Contributor

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 ?

Copy link
Contributor

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

Copy link
Member

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.

* @see PagedFlux
*/
@ServiceClient(builder = KeyClientBuilder.class, isAsync = true, serviceInterfaces = KeyService.class)
@ServiceClient(builder = KeyClientBuilder.class, isAsync = true)
Copy link
Member

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.

}
}

private HttpClient buildAsyncAssertingClient(HttpClient httpClient) {
Copy link
Member

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) {
Copy link
Member

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()
Copy link
Member

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.

Copy link
Member

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()
Copy link
Member

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.

@vcolin7 vcolin7 merged commit 3bcf41a into Azure:main Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants