Skip to content

fix(ops): ignore -linux-* suffixes when fetching distroless image tags - #2011

Open
bwplotka wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
bwplotka:fading-void-blasts-23h19
Open

fix(ops): ignore -linux-* suffixes when fetching distroless image tags#2011
bwplotka wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
bwplotka:fading-void-blasts-23h19

Conversation

@bwplotka

Copy link
Copy Markdown
Collaborator

Ignore -linux-* architecture-specific tag suffixes when searching for latest distroless tags in gmpctl.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors the gmpctl release automation tool, simplifying dependency management by installing tools locally to .bin/, removing the NVD API key requirement and severity-based sorting for vulnerability checks, and adding a -skip-tag-signing flag. Feedback on these changes includes addressing a performance bottleneck by avoiding redundant go install executions, correcting non-standard hyphen escaping in grep filters, and fixing inconsistent indentation and global EXIT trap usage in lib.sh.

Comment thread ops/gmpctl.sh
Comment thread ops/gmpctl/lib.sh Outdated
Comment thread ops/gmpctl/lib.sh Outdated
Comment thread ops/gmpctl/lib.sh Outdated
@bwplotka
bwplotka changed the base branch from gmpctl-tools to main July 24, 2026 22:39
…ap cleanup

Signed-off-by: bwplotka <bwplotka@google.com>

@avilevy18 avilevy18 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

AI mentioned a minor nit regarding the .bingo/variables.env trap cleanup in release-lib::manifests_regen():

Using a RETURN trap (trap '...' RETURN) in Bash functions automatically executes cleanup whenever the function finishes or returns (on both success or failure). This avoids needing trap - EXIT or touching process-wide EXIT traps:

if [[ -f "${dir}/.bingo/variables.env" ]]; then
    cp "${dir}/.bingo/variables.env" "${dir}/.bingo/variables.env.bak"
    trap 'mv "${dir}/.bingo/variables.env.bak" "${dir}/.bingo/variables.env" 2>/dev/null || true' RETURN
    echo "#!/bin/bash" >"${dir}/.bingo/variables.env" # Clean the file.
fi

Non-blocking, feel free to keep as-is or adjust.

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.

2 participants