Skip to content

Remove WithCPK and thread options down the hierarchy#8277

Merged
tg-msft merged 1 commit into
Azure:masterfrom
tg-msft:cpk
Oct 21, 2019
Merged

Remove WithCPK and thread options down the hierarchy#8277
tg-msft merged 1 commit into
Azure:masterfrom
tg-msft:cpk

Conversation

@tg-msft
Copy link
Copy Markdown
Member

@tg-msft tg-msft commented Oct 21, 2019

Fixes #7830

using Azure.Storage.Blobs.Models;
using Azure.Storage.Blobs.Specialized;

namespace Azure.Storage
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this be in Test namespace?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It doesn't matter much and it's an existing partial class. I'm trying to touch as few files as possible with all the big changes in flight.

/// </param>
internal BlobServiceClient(Uri serviceUri, HttpPipelinePolicy authentication, BlobClientOptions options)
: this(serviceUri, authentication, options.Build(authentication), new ClientDiagnostics(options))
: this(serviceUri, authentication, options.Build(authentication), new ClientDiagnostics(options), options?.CustomerProvidedKey)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can options be null here? If so, there would already be a bug in the options.Build call.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No - everyone who calls this does options ?? new BlobClientOptions().

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So can you update to be options.CustomerProvidedKey?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I could, but this is still safer so I'd prefer to leave it.

@pakrym
Copy link
Copy Markdown
Contributor

pakrym commented Oct 21, 2019

Do we have coverage for all the ctors? Especially around options being nullable? I've broken it once. Otherwise change LGTM

@tg-msft
Copy link
Copy Markdown
Member Author

tg-msft commented Oct 21, 2019

/azp run net - storage - ci

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@tg-msft
Copy link
Copy Markdown
Member Author

tg-msft commented Oct 21, 2019

Yes, we've got .ctor coverage here. It might not be completely exhaustive, but it's pretty decent because we flow the client hierarchy a lot and call these particular overloads.

@tg-msft tg-msft merged commit 0420109 into Azure:master Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P0] Storage: Remove WithCustomerProvidedKey methods

4 participants