Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Use GET on the container to check if the storage container exists #16

Merged
merged 2 commits into from
Aug 21, 2020

Conversation

avoltz
Copy link
Contributor

@avoltz avoltz commented Jul 21, 2020

The list_containers op will return a max of 5000 containers. This
causes the container check to fail when there are > 5000 containers
in the storage account. Using a GET on the container avoids this limit.

This fixes #15

@@ -115,10 +115,23 @@ def write(chunk)
tmp.unlink
end
end

def container_exists?(container)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a test for this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added tests for this function.

The list_containers op will return a max of 5000 containers. This
causes the container check to fail when there are > 5000 containers
in the storage account. Using a GET on the container avoids this limit.
@avoltz avoltz force-pushed the container_exist_check branch from 35b34e0 to b1b5eb8 Compare August 13, 2020 02:33
@ghost
Copy link

ghost commented Aug 14, 2020

CLA assistant check
All CLA requirements met.

@avoltz avoltz requested a review from logachev August 20, 2020 18:10
@logachev logachev merged commit 768938e into microsoft:master Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

checking for existing container is unreliable when the storage account has more than 5000 containers
3 participants