Fix detection of docker image digest for diagnostic purposes #10951
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.
Motivation
I was asked about the different meaning of localstack version/commit/image SHAs and coincidentally noticed that the digests we were showing were actually the local image ids and not the digest on docker hub that we can actually pull for reproducing the issue.
Changes
docker pull localstack/localstack@sha256:....
LocalStack Docker image sha
is now the actual digest that can be pulled (see above). This was a bit unfortunate since we now also refer to this in our GitHub issue template. If there's no manifest yet, it returns the fallback valueUnavailable
Discussion
@dfangl I noticed that fortunately the docker client works correctly when called with
image_details = DOCKER_CLIENT.inspect_image(image_name='sha256:6dd80f78fdaa60bcf9dcc3a34a072d3be3f577350e9e46b91f538f54531eef81')
even though the naming of the parameter ininspect_image
might not suggest so. Theinspect_container
method calls the parametercontainer_name_or_id
, maybe we should do t he same forinspect_image
as well? wdyt?