Skip to content

build: Tag Cloud Build images with latest - #174

Merged
armenzg merged 1 commit into
mainfrom
junior/cloudbuild-latest-tag
Nov 16, 2026
Merged

armenzg merged 1 commit into
mainfrom
junior/cloudbuild-latest-tag

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Deploying gcr.io/sentry-dev-tooling/sentry-github-actions-app@sha256:0fabc1eb11… to Cloud Run failed with:

failed to convert config file to RiptideContainer protocol buffer (image.ToRiptideContainer): got 1 Manifest.Layers vs 0 ConfigFile.RootFS.DiffIDs

Each build pushes three entries to GCR: the image index, which gets the commit SHA tag, plus two untagged child manifests, the platform image and a BuildKit attestation. An attestation has one in-toto "layer" and no root filesystem, which is what Cloud Run rejects. In the image picker, the untagged digests all look the same.

This adds a cloudbuild.yaml that tags the image with latest as well as the commit SHA, so you can deploy :latest instead of picking a digest. docs/deployment.md now says to deploy by tag. It doesn't change the attestations.

Open decisions:

  • The Cloud Build trigger lives in GCP and uses the "Dockerfile" build type, which ignores this file. Someone needs to switch the trigger's configuration to "Cloud Build configuration file" at cloudbuild.yaml. Until then this file does nothing.
  • To get rid of the untagged attestation entries completely, add --provenance=false --sbom=false to the build. That removes supply-chain metadata, so this PR leaves it out.

Not verified: I haven't run a Cloud Build with this config.

via @armenzg.

--

View Session [Sentry]

Cloud Build pushes untagged child manifests, including BuildKit
attestations, next to the tagged image. Picking an attestation in Cloud
Run fails with "got 1 Manifest.Layers vs 0 ConfigFile.RootFS.DiffIDs".
Add a cloudbuild.yaml that also tags the image with latest, and document
deploying by tag.

Co-Authored-By: Armen Zambrano Gasparnian <44410+armenzg@users.noreply.github.com>
@armenzg
armenzg marked this pull request as ready for review November 16, 2026 14:10
@armenzg
armenzg requested a review from a team as a code owner November 16, 2026 14:10
@sentry-junior
sentry-junior Bot requested a review from armenzg November 16, 2026 14:10
@armenzg
armenzg merged commit 208793b into main Nov 16, 2026
17 checks passed
@armenzg
armenzg deleted the junior/cloudbuild-latest-tag branch November 16, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant