[ACR] Add new command to check if specific blob is available to pull from registry#27676
[ACR] Add new command to check if specific blob is available to pull from registry#27676
Conversation
❌AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| acr check-health | cmd acr check-health added parameter image |
||
| acr check-health | cmd acr check-health added parameter password |
||
| acr check-health | cmd acr check-health added parameter resource_group_name |
||
| acr check-health | cmd acr check-health added parameter username |
|
ACR |
|
Please address this CI issues |
|
@SakoPak Please note that we are launching the release for this sprint this week. Please resolve all comments and conflicts by Tomorrow, otherwise the release of this PR will have to be postponed to the next sprint (on 12-05) |
This PR can wait until next sprint as it's still in progress, thank you for the heads up. |
rosanch
left a comment
There was a problem hiding this comment.
Overall looks good, I left some comments, please do not resolve questions. I'll do after reading the response.
Thanks
estebanreyl
left a comment
There was a problem hiding this comment.
Added a few comments, mostly on edge cases to consider, overall lgtm
| # If manifest is not a Docker Manifest List, find the smallest blob in the given single manifest | ||
| smallest_blob = min(manifest['layers'], key=lambda layer: layer['size']) | ||
|
|
||
| smallest_digest = smallest_blob['digest'] |
There was a problem hiding this comment.
One edge case to account for here is that smallest_blob could be empty, this is because manifests with no layers and Manifest lists with no sub-manifests are also technically allowed. In that situation you might be able to pull the manifest as if it is a regular blob (haven't tried it but it should work) or error and ask the user to use a different image.
There was a problem hiding this comment.
ok that's a great point, I will factor in this edge case and have it pull the manifest like a regular blob, thanks!
|
@SakoPak Could you please resolve these CI issues? |
|
@SakoPak is this still needed? |
Description
az acr check-health --name myRegistry --image hello-world@sha256@abc123Testing Guide
az acr check-health -n MyRegistry --image hello-world@sha256:abc123az acr check-health -n MyRegistry -t hello-world:latestHistory Notes
[ACR]
az acr check-health --name --image: Add new command to check if blobs in given image can be pulled from registryThis 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.