Skip to content

PutBlobFromUrl API#20016

Closed
siminsavani-msft wants to merge 20 commits intomainfrom
siminsavani/PutBlobFromUrl
Closed

PutBlobFromUrl API#20016
siminsavani-msft wants to merge 20 commits intomainfrom
siminsavani/PutBlobFromUrl

Conversation

@siminsavani-msft
Copy link
Copy Markdown
Contributor

@siminsavani-msft siminsavani-msft commented Feb 15, 2023

Adding the PutBlobFromUrl API

  • The purpose of this PR is explained in this or a referenced issue.
  • The PR does not update generated files.
  • Tests are included and/or updated for code changes.
  • Updates to CHANGELOG.md are included.
  • MIT license headers are included in each file.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Feb 15, 2023
@siminsavani-msft
Copy link
Copy Markdown
Contributor Author

/azp run go - azblob

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bhansalivikas bhansalivikas added this to the azblob v1.0.1 milestone Feb 16, 2023
@siminsavani-msft
Copy link
Copy Markdown
Contributor Author

/azp run go - azblob

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@siminsavani-msft siminsavani-msft changed the title Adding PutBlobFromUrl PutBlobFromUrl API Feb 21, 2023
func (bb *Client) UploadBlobFromURL(ctx context.Context, copySource string, options *UploadBlobFromURLOptions) (UploadBlobFromURLResponse, error) {
opts, httpHeaders, leaseAccessConditions, cpkInfo, cpkSourceInfo, modifiedAccessConditions, sourceModifiedConditions := options.format()

resp, err := bb.generated().PutBlobFromURL(ctx, int64(0), copySource, opts, httpHeaders, leaseAccessConditions,
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.

we might need trasacational md5/crc or setting up md5 sum feature here as well.

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.

We just need to support x-ms-source-content-md5, and it will not be possible for the SDK to pre-calculate this checksum.

https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob-from-url?tabs=azure-ad#request-headers

Copy link
Copy Markdown
Member

@seanmcc-msft seanmcc-msft Mar 23, 2023

Choose a reason for hiding this comment

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

Hold off on this for now, we need to figure out what we are doing with checksuming in AzBlob. Consider this comment non-blocking.

@siminsavani-msft
Copy link
Copy Markdown
Contributor Author

/azp run go - azblob

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@siminsavani-msft
Copy link
Copy Markdown
Contributor Author

Hi @scbedd !

I have one recorded test in this PR and recorded it according (1. turned on test-proxy, recorded the test 2. ran the test-proxy command to get a new tag with updated recorded test). The CI is failing because other (unrelated to my PR) recorded tests that were merged are showing this error:

Recording ID was not returned by the response. Response body: {"Message":"Recording file path /mnt/vss/_work/1/s/.assets/bN3eZCureo/go/sdk/storage/azblob/testdata/recordings/Test/TestBlockGetAccountInfo.json does not exist.","Status":"NotFound"}

Do you know why is this happening and how I can fix this without having to recorded the recorded tests that are not related to PR?

@siminsavani-msft
Copy link
Copy Markdown
Contributor Author

Closing this PR and creating a new fresh PR here: #20558

@siminsavani-msft siminsavani-msft deleted the siminsavani/PutBlobFromUrl branch April 5, 2023 00:24
@siminsavani-msft siminsavani-msft removed this from the azblob v1.0.1 milestone Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AzBlob Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants