Граф коммитов

263 Коммитов

Автор SHA1 Сообщение Дата
Mohit Sharma 9ce3836855 Fixing rfc3339Format 2021-12-21 13:07:41 +05:30
Mohit Sharma 960ab7968d Added Generated Code | Service Version 2020-10-02 2021-12-21 12:38:41 +05:30
siminsavani-msft deb21f705e
Supporting User Delegation SAS (#259)
* Changes to support new user delegation SAS

* Added support for user delegation SAS

* Support generation of Directory SAS

* Correcting UDK struct and updating SAS & Blob SAS query params

* Pinning down old SASVersion

* Renaming for SDK consistency, adding tests

* Reorganizing for CI

* Cleaning up tests

* Cleaning up tests due to CI

* Adding change to resolve CI issues

* Addressing PR comments

* Test for sdd

* Update sdd test

* Fix tests

Co-authored-by: Narasimha Kulkarni <63087328+nakulkar-msft@users.noreply.github.com>
Co-authored-by: Ze Qian Zhang <zezha@microsoft.com>
2021-08-27 11:20:32 -04:00
siminsavani-msft ce5190c9fe
Adding BlobDeleteType to Delete API (#291)
* Adding BlobDeleteType to Delete API

* Added test for soft delete and undelete

* Adding skip to this test as verisioning must be disabled in advance

* Permanent Delete method

* Updated test to run with alternate bsu

* Error handling in test

* Adding sleep in test

* Adding sleep after creation

* Improving test for Delete API

* Checking test

* Adding more sleeps

* Updating pipeline

* Break up tests

* Clean up, removing comments
2021-08-26 17:58:57 -07:00
adreed-msft 6996bcb207
Enable grabbing ACLs from ADLS Gen 2 accounts (#289)
* Update readme directives to allow for obtaining ACLs

* Put the properties in the correct place

* Actually regenerate the code

* Add SAS token permissions for get/set acl

* add extra perms to blob SAS
2021-08-25 11:26:01 -04:00
Ze Qian Zhang a7a0fdbf7c
Merge pull request #285 from kfarnung/testcontainercleanup
Clean up missed test containers
2021-08-25 01:06:34 -07:00
Mohit Sharma 4977a5b42d
fix: chunkwriter hangs on cancel (#239)
* fix: chunkwriter hangs on cancel

* fix: chunkwriter hangs on cancel

Co-authored-by: David Gustafson <davigust@github.com>
2021-08-17 23:58:25 +05:30
adreed-msft 66275612aa
Update service version to 2020-08-04 and add markdown directives (#288) 2021-07-13 12:05:45 -07:00
Kyle Farnung 2ba6c374d9 Clean up missed test containers
- TestFilterBlobsUsingAccountSAS: The SAS token didn't have permission
  to delete containers. Add the permission to allow cleanup to succeed.
- TestPageBlockWithCPKByScope: The deferred cleanup was commented out,
  it's not clear why.
2021-07-08 23:49:37 -07:00
simin c166691385 Updated version to 0.14 2021-07-02 17:05:52 -04:00
simin 6304349c23 Incremented version and added to changelog 2021-07-01 18:44:16 -04:00
siminsavani-msft 09465473bf
Resolving Concurrency Issues (#275)
* Resolving concurrency issues

* Fixing concurrency test

* Minor changes
2021-07-01 17:53:46 -04:00
Ze Qian Zhang 0aff822928
Merge pull request #277 from yangp18/update-dep
Upgrade go dependencies to address CVE-2020-26160
2021-07-01 02:38:20 -07:00
Yang Peng c2ea994708 Update go dependencies 2021-05-24 12:34:01 -04:00
Ashish Mishra d80c8c7c7c Calling out that the library is in preview 2021-04-14 17:42:30 -07:00
Mohit Sharma 16cf969ec1
Offer Knob to Disable Syslog | Default logging to syslog enabled (#268)
* Provide Knob For Syslog

* Reverting changes to GetTags/SetTags & BlobPropertiesInternal (#269)

* Adding MSI Login Example (#241)

* Added MSI login example

* Minor edits

Co-authored-by: zezha-msft <zezha@microsoft.com>

* Reverting changes to GetTags/SetTags & BlobPropertiesInternal

Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com>
Co-authored-by: zezha-msft <zezha@microsoft.com>

Co-authored-by: siminsavani-msft <77068571+siminsavani-msft@users.noreply.github.com>
Co-authored-by: zezha-msft <zezha@microsoft.com>
2021-04-07 08:08:46 +05:30
Mohit Sharma e80b0e0063
Adding MSI Login Example (#241)
* Added MSI login example

* Minor edits

Co-authored-by: zezha-msft <zezha@microsoft.com>
2021-03-23 11:35:02 +05:30
Sreejith Kesavan 5e5d32824b
Keep compatibility with Go 1.13.14. (#264)
* - Keep compliance with Golang 1.13.14. http.Header has no method Values
  on older go versions.

* Do not return error when client request id is missing
2021-03-17 21:56:11 +05:30
siminsavani-msft b0f228e10f
Adding Support for PutBlobFromUrl (#251)
* Regenerate SDK

* Regenerate SDK with proper version

* Adding support for PutBlobFromURL

* Correcting regen code and handling other errors

* Resolving comments on PR

* Correcting SetTags method

* Updating tests with GetTags and SetTags

* Remove swagger/Go_BlobStorage/code-model-v1

* Checks value of metadata & reorganized tests

Co-authored-by: Adele Reed <adreed@microsoft.com>
2021-02-26 15:25:57 -05:00
Mohit Sharma 68300d2983
Removed requestId, Timeout, versionId, snapshot from the function signature of GetTags() and SetTags() (#252)
* Changed the function signature of getTags and setTags

* Minor Adjustment

* Review - 1
2021-02-11 14:48:52 +05:30
Ze Qian Zhang fb7ebad396
Merge pull request #249 from Azure/dev
Release v0.13
2021-01-28 13:37:54 -08:00
zezha-msft e76e24c47d Incremented version for v0.13 release 2021-01-28 13:06:19 -08:00
John Doak b759048fb9
UploadStreamToBlockBlob gets TransferManager option (#234)
See: https://github.com/Azure/azure-storage-blob-go/issues/233

There needs to be a more robust way of controling memory reuse and threadpooling for streaming copies (or maybe all copies, I will not speak to that here).

This introduces a new interface called TransferManager.  This provides 3 main fuctions:

- Control buffer allocation
- Control goroutine allocation
- Allow reuse

This allows a developer to control exactly how they wish to handle this for their use case.  We provide two implementations:
- Static buffer allocation similar to the original implementation
- Threadpool allocation similar to how it currently works since my change

Additionally, both of these support having shared pools between calls which neither did before.

It also allows for custom creation of implementations by users that better support their needs (a hybrid of the two above, one that adjusts buffer or concurrency based on transfer speed, ...)

Note: the behavior by default returns to the static buffer method here.  If azcopy likes the current behavior, it should switch using NewSyncPool()

Like the original change, this does not change the API compatibility.  I think that is probably something that should be done, but not in this change.

There are 3 files here that were not part of my change, but were not go fmt, so they have been updated by the go tool:
- bytes_wrtier.go
- zc_*

All tests without the end to end test system that are expected to pass do (comparing the non-changed version against this one).

Co-authored-by: John Doak <jdoak@DANEWMAN-LENOVO.redmond.corp.microsoft.com>
2021-01-27 18:26:34 -08:00
siminsavani-msft 63207aaf35
Validating Client Request ID and Testing (#246)
* Validating client request id and testing

* Fixed a bug that was causing failing errors

* Resolved comments from PR & made additional fixes

* Fixed bug throwing nil pointer errors

Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com>
2021-01-21 17:03:18 -05:00
Mohit Sharma 6df5d9af22
Merge pull request #235 from Azure/dev
Release v0.12.0
2020-12-09 17:40:48 +05:30
Mohit Sharma 559b75bbc3
v0.12.0 Release change logs (#231)
* v0.12.0 Release ChangeLogs & BreakingChanges

* Updated changelogs

* Added mmf changes in ChangeLog.md
2020-12-09 12:49:08 +05:30
Mohit Sharma 0c35e970a8
Fixed #230 (#232) 2020-11-20 23:41:19 +05:30
Mohit Sharma b336354e28
#7507887 #7507908 [Go][Blob] Support CPK-N/CPK-V (#227)
* Basic CPK-V/CPK-N Code

* Minor Fix

* Rev - 1 | Fixed Comment

* Added CPK in retry download
2020-11-19 15:05:57 +05:30
Mohit Sharma e5968b22f5
Merge pull request #228 from Azure/issue/http-log-policy
Issue/http log policy
2020-11-11 10:24:50 +05:30
Pedro Araujo 28f9c3868c
Assert `StorageError` type before using it
The patch that tried to de-encapsulate the response status code assumed
the error would be of the `StorageError` type. We now test the error
type before trying to get to the response; if the error is not a
`StorageError`, the log severity will always be increased.
2020-11-04 16:53:15 +00:00
Mohit Sharma a3810da520
Merge pull request #217 from pharaujo/patch-1
Correctly handle HTTP errors in RequestLogPolicy
2020-11-04 21:17:14 +05:30
Pedro Araujo 8c5ecd9e2a
Correctly handle HTTP errors in RequestLogPolicy
The condition that tests the HTTP status code to decide whether or not to upgrade log severity never sees the 4xx and 5xx responses because they are encapsulated in a `StorageError`.

Addresses #214
2020-11-03 12:07:52 +00:00
Kyle Farnung 6d84fabf1c
[highlevel] Stop using memory-mapped files (#175)
* [highlevel] Stop using memory-mapped files

While investigating this SDK for uploading and downloading large blobs
(e.g. 25GB or more) it became apparent that the memory-mapped approach
has some severe limitations:

1. Limits the file size on 32-bit systems (theoretically 4GB, but much
   less in practice).
2. Has no backpressure when writing to slower storage mediums.
3. Appears to finish faster, but the OS spends several minutes flushing
   the modified RAM to disk afterwards (depends on the speed of the
   disk).

On a VM with 16GB of RAM and a slow disk (spinning in this case) the
algorithm quickly overwhelms the available memory and causes severe
performance degradation. It ended up simultaneously trying to flush to
the slow data disk and page out to the slightly faster OS disk.

The solution is to stop using memory-mapped files (at least the way the
SDK currently uses then) and switch to the `io.ReaderAt` and
`io.WriterAt` interfaces. They explicitly allow for parallel access to
non-overlapping regions which make them a good candidate for this
purpose.

Benchmarking large downloads (25GB file) between azcopy 10.4.3 and these
updates using a test app, the difference between them is within 10
seconds. When compared against the original code on a beefy machine with
plenty of RAM the measured execution time is faster, but there is a
little bit of delay while the last of the data flushes from RAM to disk.

* PR feedback
2020-10-28 14:58:49 -07:00
Mohit Sharma 456ab4777f
Merge pull request #220 from Azure/dev
Merge dev to master
2020-10-28 17:36:46 +05:30
Ze Qian Zhang 0a7bd7e52f
Set up CI with Azure Pipelines (#224)
* Set up CI with Azure Pipelines

[skip ci]

* Remove Travis and outdated Gopkg files

* Updated GO Version to 1.15

Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com>
2020-10-28 17:24:36 +05:30
Mohit Sharma fb49bc9969
Release v0.11.0 (#225) 2020-10-28 16:43:53 +05:30
Alexey Shvechkov 1313c6c94c Adding method GetManagedDiskPageRangesDiff() which was implemented in .Net SDK but still missing in azure-storage-blob-go/azblob@dev
For details on GetManagedDiskPageRangesDiff() in .Net SDK see
https://docs.microsoft.com/en-us/dotnet/api/azure.storage.blobs.specialized.pageblobclient.getmanageddiskpagerangesdiff?view=azure-dotnet
2020-10-26 16:14:05 -07:00
Mohit Sharma 8d8fc11be7
Add tag/filter-by-tag permissions in Blob, Container and Account (#218)
* Add tag/filter-by-tag permissions in Blob, Container and Account level permission struct

* Added Tests

* Fixed Test

* Fixed Test - 1
2020-10-22 13:18:06 +05:30
Mohit Sharma 8327933c9a
[BlobSDK][GO] Feature: Set Blob Tags/Get Blob Tags/Find blobs by tags (#209)
* Get Blob Tag/Set Blob Tag/Find Blob by Tag

* Get Blob Tag/Set Blob Tag/Find Blob by Tag + Writing Tests

* Bug Fix

* Code Refactoring

* Code Refactoring 2

* Test case for findblobsbytags

* Minor Fix 1

* rectified blob tags comment corresponding to ifTags param
2020-09-25 07:35:01 +05:30
Ze Qian Zhang a0589d15da
Consider 502 as a temporary error (#204) 2020-09-10 09:53:17 +05:30
Mohit Sharma 5d8d5fa544
Fixing BlockBlobMaxUploadBlobBytes value (#207)
Reverting BlockBlobMaxUploadBlobBytes to 256MB
2020-09-04 18:54:12 +05:30
mohsha-msft bfba60a016 Merge branch 'dev' of https://github.com/Azure/azure-storage-blob-go into dev 2020-08-31 19:03:09 +05:30
Jonas-Taha El Sesiy 779b1865d2 Rev go to 1.15, adal to 0.9.2 (#205)
Update go to latest version
Update adal dependency
2020-08-31 19:02:57 +05:30
Mohit Sharma 7b8190d57e [Go][Blob][2019-02-02] Set tier support on copy/put blob API (#203)
* Added tier parameter in upload block blob function signature + Fixed usage + Wrote a test case for validation.

* Added tier parameter in
a. CopyFromURL, CommitBlockList of Block Blob
b. Create (Page Blob)
Fixed all occurrence

* Minor Change

* Added test
2020-08-31 19:02:57 +05:30
Mohit Sharma 3bd5b9abfd Minor versioning fix (#200) 2020-08-31 19:02:56 +05:30
Jonas-Taha El Sesiy 1b8420f6e1 update to go1.14 2020-08-31 19:02:56 +05:30
Mohit Sharma fd00850b08 Changed block blob limit (#199) 2020-08-31 19:02:56 +05:30
Mohit Sharma fabac9cf89 Minor Jumbo Blob Fix and Blob Versioning fix (#198)
* Minor Jumbo Blob fix + versioning fix

* Test Case Fix

* Renamed struct back to original
2020-08-31 19:02:56 +05:30
Mohit Sharma a702648539 #7508079 [Go][Blob][2019-12-12] Blob Versioning (#190)
* Generated code for 12-12-2019 spec

* Fix test

* Changes

* Basic Testing and modification in WithVersionId function.

* Added Tags and Versions in BlobListingDetails.

* Added Tests

* Added TestCases

* Commented out tests which require versioning disabled.

* Added Tests

* Testcases 1-on-1 with python SDK

* Moved all tests to same file for ease of accessibility

Co-authored-by: zezha-msft <zezha@microsoft.com>
2020-08-31 19:02:56 +05:30
Jonas-Taha El Sesiy e2e5bec6a9
Rev go to 1.15, adal to 0.9.2 (#205)
Update go to latest version
Update adal dependency
2020-08-31 12:31:04 +05:30