8000 Fix detection of docker image digest for diagnostic purposes by dominikschubert · Pull Request #10951 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Fix detection of docker image digest for diagnostic purposes #10951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

dominikschubert
Copy link
Member
@dominikschubert dominikschubert commented Jun 4, 2024

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

  • The diagnose endpoint now also outputs the image sha that can be used to pull from docker hub via docker pull localstack/localstack@sha256:....
  • On startup the value of 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 value Unavailable

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 in inspect_image might not suggest so. The inspect_container method calls the parameter container_name_or_id, maybe we should do t he same for inspect_image as well? wdyt?

@dominikschubert dominikschubert requested a review from dfangl June 4, 2024 09:13
@dominikschubert dominikschubert self-assigned this Jun 4, 2024
@dominikschubert dominikschubert added the semver: patch Non-breaking changes which can be included in patch releases label Jun 4, 2024
Copy link
github-actions bot commented Jun 4, 2024

LocalStack Community integration with Pro

    2 files      2 suites   1h 40m 4s ⏱️
3 007 tests 2 685 ✅ 322 💤 0 ❌
3 009 runs  2 685 ✅ 324 💤 0 ❌

Results for commit add6b0a.

♻️ This comment has been updated with latest results.

@dominikschubert dominikschubert marked this pull request as draft June 4, 2024 11:32
@dominikschubert
Copy link
Member Author

Unfortunately it seems for CI this doesn't work and needs a fallback since the image doesn't have a manifest yet.

@dominikschubert dominikschubert marked this pull request as ready for review June 10, 2024 06:22
@dominikschubert dominikschubert added this to the 3.5 milestone Jun 10, 2024
Copy link
Member
@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Looks good! I think renaming the parameter is a good idea, I honestly also was not aware that it was possible like this, we should definitely document it!

@dominikschubert
Copy link
Member Author

Looks good! I think renaming the parameter is a good idea, I honestly also was not aware that it was possible like this, we should definitely document it!

Gonna do that in a follow-up though so we can get this into the release still

@dominikschubert dominikschubert merged commit 781568d into master Jun 12, 2024
32 checks passed
@dominikschubert dominikschubert deleted the fix-image-sha256 branch June 12, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0