[ACR] Fix#16700: Use "exists" api to check storage blob existence#17299
Merged
fengzhou-msft merged 5 commits intoAzure:devfrom Mar 18, 2021
northtyphoon:bindu/fix-16700
Merged
[ACR] Fix#16700: Use "exists" api to check storage blob existence#17299fengzhou-msft merged 5 commits intoAzure:devfrom northtyphoon:bindu/fix-16700
fengzhou-msft merged 5 commits intoAzure:devfrom
northtyphoon:bindu/fix-16700
Conversation
yungezz
approved these changes
Mar 15, 2021
jaysterp
reviewed
Mar 15, 2021
| if log_exist: | ||
| props = blob_service.get_blob_properties( | ||
| container_name=container_name, blob_name=blob_name) | ||
| metadata = props.metadata |
Member
Author
There was a problem hiding this comment.
no, it will throw error like AureHttpError, in that case, we will retry or just exit if the code doesn't know how to handle it
jaysterp
approved these changes
Mar 16, 2021
shahzzzam
reviewed
Mar 16, 2021
| available = props.properties.content_length | ||
| else: | ||
| # Wait a little bit before checking the existence again | ||
| time.sleep(1) |
Contributor
There was a problem hiding this comment.
where does it retry after sleep?
Member
Author
There was a problem hiding this comment.
the code will continue to the loop, since log_exists is false in this case, it will execute L158-159 to check the existence again
shahzzzam
approved these changes
Mar 16, 2021
fengzhou-msft
approved these changes
Mar 17, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pr is to fix #16700
Testing Guide
az acr build --cmd "docker images" /dev/null
before the fix, the command may output BlobNotFound error sometimes.
after the fix, the command will not output BlobNotFound error.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.