Repository navigation
ci(moss): (3/4) add promote_artifacts.sh helper script - #5603
Merged
Merged
Conversation
chiajunglien
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
October 8, 2026 04:10
There was a problem hiding this comment.
Code Review
This pull request introduces a new Bash script, .github/scripts/promote_artifacts.sh, designed to promote Docker images from a staging Artifact Registry to a production repository and poll for the operation's completion. The review feedback highlights several opportunities to optimize performance and follow shell scripting best practices. Key recommendations include reusing the cached access token inside the polling loop instead of repeatedly invoking gcloud, replacing multiple Python interpreter spawns with jq for JSON construction and parsing, and using native Bash brace expansion instead of the external seq command.
4 tasks done
chiajunglien
force-pushed
the
emma/moss-pr3-promote-script
branch
from
October 8, 2026 07:15
7c9d0f8 to
5722dd3
Compare
Signed-off-by: EmmaLien <emmalien@google.com>
chiajunglien
force-pushed
the
emma/moss-pr3-promote-script
branch
from
October 8, 2026 07:28
5722dd3 to
1affb73
Compare
4 tasks done
SurbhiJainUSC
approved these changes
Oct 8, 2026
bvandermoon
approved these changes
Oct 9, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
PR 3 of 4: The Promotion Script Refactor (split from #5582 per review feedback).
This PR adds a reusable helper script
.github/scripts/promote_artifacts.shthat encapsulates calling the Google Cloud Artifact Registry:promoteArtifactAPI (Exit Gate) to promote Docker image versions from a staging repository to a production repository:projects/<project>/locations/<location>/repositories/<prod_repo>:promoteArtifactwithattachment_behavior: "PUBLIC_BCID_VSA_ONLY".done: true) and verifies no operation error occurred."already exists"responses idempotently.Tests
bash -nandcodespell.:promoteArtifactlogic verified in GitHub Actions ontpu-prod-env-multipod(maxtext-images-staging->maxtext-images).Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.