Skip to content

[storage] parallel upload refactor#12185

Merged
ljian3377 merged 4 commits into
Azure:masterfrom
ljian3377:storage/upload-refactor
Nov 4, 2020
Merged

[storage] parallel upload refactor#12185
ljian3377 merged 4 commits into
Azure:masterfrom
ljian3377:storage/upload-refactor

Conversation

@ljian3377
Copy link
Copy Markdown
Member

@ljian3377 ljian3377 commented Oct 30, 2020

uploadData for Node.js and browsers, refactor duplicated code.
This fixes #9500, fixes #9927, fixes #6119 and fixes #6120.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Oct 30, 2020
@ljian3377 ljian3377 added the APIChange This PR contains an addition or change to the API signature and must be reviewed by an architect. label Oct 30, 2020
Comment thread sdk/storage/storage-file-share/src/Clients.ts Outdated
assert.equal((await blockBlobClient.getProperties()).accessTier, "Hot");
});

it("uploadData should work with Buffer, ArrayBuffer and ArrayBufferView", async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not testing the browser path for uploadData, please add!

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.

Done.

- `generateAccountSASQueryParameters()`
- `generateBlobSASQueryParameters()`
- Parallel uploading and downloading
- Parallel uploading and downloading. Note that `BlockBlobClient.uploadData()` is available in both Node.js and browsers.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changelog

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.

Done.

@check-enforcer
Copy link
Copy Markdown

check-enforcer Bot commented Nov 2, 2020

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run js - [service] - ci


/**
* Compare the content of body from downloading operation methods with a Uint8Array.
* Work on both Node.js and browser environment.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NIT

Suggested change
* Work on both Node.js and browser environment.
* Works in both Node.js and browser environment.

@xirzec
Copy link
Copy Markdown
Member

xirzec commented Nov 2, 2020

I really like the consolidation into a single method.

// High level functions

/**
* Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.
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.

Blob [](start = 31, length = 4)

Blob is also avaiable in Node.js.

Copy link
Copy Markdown
Member

@XiaoningLiu XiaoningLiu left a comment

Choose a reason for hiding this comment

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

:shipit:

@ljian3377 ljian3377 merged commit 3f766f0 into Azure:master Nov 4, 2020
@ljian3377 ljian3377 deleted the storage/upload-refactor branch November 4, 2020 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APIChange This PR contains an addition or change to the API signature and must be reviewed by an architect. Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

4 participants