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

287 Коммитов

Автор SHA1 Сообщение Дата
Ze Qian Zhang ac3d8bf5f0 Updated version for 0.15 and added changelog 2022-04-27 00:26:56 -07:00
Ze Qian Zhang 69bf9eb93d
Merge pull request #284 from kfarnung/chunkwriting_buffers
When the buffer isn't filled to capacity a new slice is created that's
smaller than the original. In that case the smaller slice is returned to
the pool which prevents the rest of the capacity from being used again.

The solution is to pass the original slice through and attach the
length. This allows the original slice to be returned to the pool once
the operation is complete.

This change also simplifies the `sendChunk` method, ensuring that the
buffer is returned to the TransferManager even when no bytes were read
from the reader.
2022-04-27 00:15:13 -07:00
Ze Qian Zhang 7a7d02e956
Merge branch 'dev' into chunkwriting_buffers 2022-04-27 00:14:32 -07:00
Ze Qian Zhang 609d45c750
Merge pull request #322 from Azure/dev-master-merge
Dev master merge
2022-04-27 00:09:45 -07:00
Ze Qian Zhang 36a3b7cc17 Removed swagger spec 2022-04-26 23:59:27 -07:00
Ze Qian Zhang a5410061cf Merge remote-tracking branch 'origin/master' into dev 2022-04-26 00:15:48 -07:00
siminsavani-msft fcec3a32c3
Added SAS Permission for Permanent Delete (#305)
* SAS permission for permanent delete

* Move test

* Commenting out test

* Small fix

* Comment out other test

* Small fix
2022-04-25 17:07:12 -07:00
adreed-msft e7f22758df
Implement copy source authorization (#317)
* Implement copy source authorization

* Implement testing

* Nil check

* Bump timeout

* Fix time format

* Reduce test code dupe

* Correct timezone issue
2022-04-25 15:11:09 -07:00
Mohit Sharma 7e629133b5
Rehydrate Priority In SetTier (#320)
Co-authored-by: t-iverma <t-iverma@microsoft.com>
2022-04-21 12:10:53 +05:30
adreed-msft afc471d260
Implement version/object level WORM operations (Legal hold & Immutability Policy) (#300)
* Implement Legal hold & Immutability Policy

* Add immutability policy options to relevant blob functions

* Fix tests, add on create tests

* Fix tests after merge

* Set environment variables

* Only scan for immutability if the container could have it

* Extend testing, close response bodies.

* Increase stack history size

* Larger history size

* Back to 7

* Only use SRP to cleanup immutability containers

* Handle containers not existing

* Add list testing

* Add immutability SAS and tests

* Disable race testing for now

* Added Generated Code | Service Version 2020-10-02 (#315)

* Added Generated Code | Service Version 2020-10-02

* Minor Edit

* TestListBlobsIncludeDeletedWithVersion

Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com>
2022-03-28 09:26:44 -07:00
Mohit Sharma 83a533be0a
Minor Fix (#316) 2022-02-22 18:03:45 +05:30
Mohit Sharma 3d50a5f3aa
Eagerly cancel timeout context when response has no body, fixes #253 (#313)
Co-authored-by: Philip Dubé <phdub@microsoft.com>
2021-11-09 10:49:06 +05:30
Ze Qian Zhang b32b5e3579
Update README.md 2021-10-25 11:53:17 -07:00
Ze Qian Zhang 9c6abd1126
Update README to point users to new azblob preview 2021-10-25 11:50:34 -07:00
siminsavani-msft 4604c9fd08
Revert "Revert "Fix issue with context timeout below 1 second (#295)" (#299)" (#301)
This reverts commit b9bed59a54.
2021-08-31 16:52:56 -04:00
siminsavani-msft b9bed59a54
Revert "Fix issue with context timeout below 1 second (#295)" (#299)
This reverts commit 93b76ee762.
2021-08-27 11:33:38 -04:00
Bertrand Mermet 93b76ee762
Fix issue with context timeout below 1 second (#295) 2021-08-27 11:21:15 -04:00
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
jared-gs 3780d5b8ec
Return nil when blob tags map is empty (#293)
* Check if blobTagsMap map is empty or nil

* headers

* incl all functions
2021-08-25 01:10:36 -07:00
Ze Qian Zhang adf3651a19
Merge pull request #283 from xaxa06/fix/list_containers
Fix ListContainers request on empty ListContainersDetail
2021-08-25 01:09:18 -07: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
Ze Qian Zhang da3335192e
Merge pull request #294 from al-cheb/al-cheb/fix-typo
Fix oen -> one typo
2021-08-17 10:19:49 -07:00
Ze Qian Zhang 290c517f6e
Merge pull request #282 from meox/master
Avoiding unecessary cast (linitng)
2021-08-17 10:19:12 -07:00
Aleksandr Chebotov ca2e008dcd Fix oen -> one typo 2021-08-06 17:11:13 +03:00
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
Kyle Farnung 249b2673e5 [chunkwriting] Return original buffer to the pool
When the buffer isn't filled to capacity a new slice is created that's
smaller than the original. In that case the smaller slice is returned to
the pool which prevents the rest of the capacity from being used again.

The solution is to pass the original slice through and attach the
length. This allows the original slice to be returned to the pool once
the operation is complete.

This change also simplifies the `sendChunk` method, ensuring that the
buffer is returned to the TransferManager even when no bytes were read
from the reader.
2021-07-08 22:08:00 -07:00
Xavier B 0c04c4ba6e Fix ListContainers request on empty ListContainersDetail
previous code was generating and invalid include="" parameter when
provided ListContainersDetail was empty (zero value)
2021-07-05 15:41:41 +02:00
Gian Lorenzo Meocci 1746942cf1 basic linting (avoind cast) 2021-07-04 10:58:20 +02:00
siminsavani-msft e8074e10d5
v0.14.0 Release (#281)
* 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

* 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>

* 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

* Adding MSI Login Example (#241)

* Added MSI login example

* Minor edits

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

* 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>

* Update go dependencies

* Resolving Concurrency Issues  (#275)

* Resolving concurrency issues

* Fixing concurrency test

* Minor changes

* Incremented version and added to changelog

* Updated version to 0.14

Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com>
Co-authored-by: Adele Reed <adreed@microsoft.com>
Co-authored-by: Sreejith Kesavan <sreejithemk@gmail.com>
Co-authored-by: zezha-msft <zezha@microsoft.com>
Co-authored-by: Yang Peng <42422145+yangp18@users.noreply.github.com>
2021-07-02 17:34:04 -04: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