Skip to content

Fix docker tagging failure in upload_artifacts by using stable tag name - #12922

Merged
kannanjgithub merged 1 commit into
grpc:v1.83.xfrom
kannanjgithub:v1.83.x-docker-tag
Jul 22, 2026
Merged

kannanjgithub merged 1 commit into
grpc:v1.83.xfrom
kannanjgithub:v1.83.x-docker-tag

Conversation

@kannanjgithub

Copy link
Copy Markdown
Contributor

The upload_artifacts.sh script previously read the build-phase image id from example-hostname.id to tag and push the example image. However, because the build and upload phases run on different VMs, differences in the Docker daemon versions and layer serialization can cause the image ID (hash of the config JSON) to be recalculated differently during docker load on the upload VM. This mismatch caused the docker tag command to fail with a "No such image" error. This change fixes the issue by directly tagging the stable, imported image tag hostname:latest (which is guaranteed to exist after docker load succeeds) instead of using the brittle sha256 hash.

Failed upload job logs

The upload_artifacts.sh script previously read the build-phase image
id from example-hostname.id to tag and push the example image.
However, because the build and upload phases run on different VMs,
differences in the Docker daemon versions and layer serialization
can cause the image ID (hash of the config JSON) to be recalculated
differently during docker load on the upload VM. This mismatch
caused the docker tag command to fail with a "No such image" error.
This change fixes the issue by directly tagging the stable, imported
image tag hostname:latest (which is guaranteed to exist after
docker load succeeds) instead of using the brittle sha256 hash.

Failed upload job logs:
https://btx.cloud.google.com/invocations/387baa72-224e-4885-bedc-9b9eb079a505/targets/grpc%2Fjava%2Fv1.83.x%2Fbranch%2Fupload_artifacts/log

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Fixes Docker image tagging/pushing in upload_artifacts.sh by avoiding reliance on image IDs that can change across docker load environments, and instead retagging from a stable loaded tag.

Changes:

  • Replace tagging source from $EXAMPLE_HOSTNAME_ID to hostname:latest when publishing versioned and latest example images.
  • Keep the push logic unchanged while ensuring the source image reference is stable across VMs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +93 to +96
docker tag "hostname:latest" "grpc/java-example-hostname:${VERSION}"
docker push "grpc/java-example-hostname:${VERSION}"
if [[ "v$VERSION" = "$LATEST_VERSION" ]]; then
docker tag "$EXAMPLE_HOSTNAME_ID" grpc/java-example-hostname:latest
docker tag "hostname:latest" grpc/java-example-hostname:latest
Comment on lines +96 to 97
docker tag "hostname:latest" grpc/java-example-hostname:latest
docker push grpc/java-example-hostname:latest
@kannanjgithub
kannanjgithub merged commit b4ca099 into grpc:v1.83.x Jul 22, 2026
15 of 16 checks passed
@kannanjgithub
kannanjgithub deleted the v1.83.x-docker-tag branch July 22, 2026 12:36
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 21, 2026
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.

3 participants