Repository navigation
Fix docker tagging failure in upload_artifacts by using stable tag name - #12922
Merged
Merged
Conversation
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
AgraVator
approved these changes
Jul 22, 2026
Contributor
There was a problem hiding this comment.
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_IDtohostname:latestwhen publishing versioned andlatestexample 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 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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