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

Update Storage to azure-core preview 3 #4489

Closed

Conversation

jianghaolu
Copy link
Contributor

Migrated from #4482

Copy link
Member

@alzimmermsft alzimmermsft left a comment

Choose a reason for hiding this comment

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

Overall looks good, just a few important questions.

@jianghaolu
Copy link
Contributor Author

Thanks for catching all the manual fixes - I'll fix up the swagger in this repo.

Copy link
Member

@JonathanGiles JonathanGiles left a comment

Choose a reason for hiding this comment

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

All @ServiceInterface annotations should have a name that is more descriptive, for when it is used with tracing, telemetry, etc.

*/
public HttpPipeline httpPipeline() {
return this.httpPipeline;
}
Copy link
Member

Choose a reason for hiding this comment

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

Even though this is not public API I'll ask anyway: is this required to be exposed? I would suggest removing it until it is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is used at

this.service = RestProxy.create(AppendBlobsService.class, client.httpPipeline());

*/
public HttpPipeline httpPipeline() {
return this.httpPipeline;
}
Copy link
Member

Choose a reason for hiding this comment

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

Remove unless required.

* Enum value only.
*/
ONLY("only");
INCLUDE("include");
Copy link
Member

Choose a reason for hiding this comment

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

An enum with only one built-in value type? Is it required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is generated from Swagger.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -84,7 +86,7 @@ public ShareProperties etag(String etag) {
*
* @return the quota value.
*/
public int quota() {
public long quota() {
Copy link
Member

Choose a reason for hiding this comment

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

I'm noticing that ShareGetPropertiesHeaders had reference types for Integer and Long, whereas this class has primitive types for int and long. Is this intentional? Can we standardise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the generated code, currently we are generating boxed types if the Swagger defines it as optional - we don't want to throw NullPointerException in our deserialization. The convenience layer can make intelligent defaults but that cannot be automated in the generator.

Copy link
Member

@alzimmermsft alzimmermsft left a comment

Choose a reason for hiding this comment

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

LGTM, let's get this in to unblock some other PR! 😄

@jianghaolu jianghaolu requested a review from rickle-msft July 24, 2019 21:33
Copy link
Contributor

@sima-zhu sima-zhu left a comment

Choose a reason for hiding this comment

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

Ship it

Copy link
Contributor

@sima-zhu sima-zhu left a comment

Choose a reason for hiding this comment

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

Can we change the FileService -> FileStorage and QueueService -> QueueStorage in auto-gen layer

* Storage SAS implementation (Azure#4404)

* SAS implementation

* Fixed some minor formatting issues

* Fixed checkstyle problems and test issue

* Remove RawClients from Blobs (Azure#4375)

Removes RawClients from Storage Blobs

* Add deleteContainer to StorageClient and getBlobClient with Snapshot to ContainerClient (Azure#4376)

* Removed raw clients

* Added deleteContainer to StorageClient

* Added getAppendBlob with snapshot to ContainerClient

* Storage queue linting, builder refactor, tests (Azure#4383)

* Initial check in for storage queue

* Initial checkin for Storage file (Azure#4414)

* Finished the restructure, refactor builder. Added sleep in record feature. Linting

* Merge Storage Blob Client Builders (Azure#4468)

Merges AppendBlobClientBuilder, BlobClientBuilder, BlockBlobClientBuilder, and PageBlobClientBuilder into a single builder class BlobClientBuilder. Additionally, JavaDoc comments for the other builder classes, ContainerClientBuilder and StorageAccountClientBuilder, were cleaned up and the way the endpoint is handled in builders was changed.
@@ -32,7 +31,7 @@ public String url() {
* @param url the url value.
* @return the service client itself.
*/
AzureBlobStorageImpl url(String url) {
AzureBlobStorageImpl setUrl(String url) {
Copy link
Member

Choose a reason for hiding this comment

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

Because this is no longer fluent, we should no longer return this.

JonathanGiles and others added 6 commits July 26, 2019 13:10
…ate serializer directly with the JacksonAdapter. Tests that failed after functionality was removed from HttpHeaders now pass with the new HttpHeaderSerializer. (Azure#4597)
…Azure#4589)

* add MethodName rule to disable builder as a method name and update issues
@jianghaolu
Copy link
Contributor Author

Moving back to #4482.

@jianghaolu jianghaolu closed this Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants