Skip to content

cmd/release: Check for open security release blockers - #443

Open
aanm wants to merge 2 commits into
mainfrom
pr/check-security-release-blockers
Open

aanm wants to merge 2 commits into
mainfrom
pr/check-security-release-blockers

Conversation

@aanm

@aanm aanm commented Oct 15, 2026

Copy link
Copy Markdown
Member

The security fixes that block a release are tracked in the private
cilium/security repository under label:release-blocker/X.Y, and are the
only pre-check item the tool does not verify itself.

This adds a step that searches for open items carrying that label and
asks for confirmation before continuing when it finds any. Most release
managers cannot read cilium/security, so the step asks about the
repository first and, on the 404 GitHub answers for a repository it
hides, warns that the check did not run instead of failing the release;
a search alone cannot tell an invisible repository from a misspelled
one, as both answer 422.

Like the release blockers in cilium/cilium the check is skipped for
pre-releases and release candidates, and it runs before the quay.io
check, which exits the process on a transport error. The pre-release
template drops the item as well, so that the checklist matches the
release tool.

aanm added 2 commits October 15, 2026 11:33
The security fixes that block a release are tracked in the private
cilium/security repository under label:release-blocker/X.Y, and are the
only pre-check item the tool does not verify itself.

This commit adds a step that searches for open items carrying that label
and asks for confirmation before continuing when it finds any. Most
release managers cannot read cilium/security, so the step asks about the
repository first and, on the 404 GitHub answers for a repository it
hides, warns that the check did not run instead of failing the release;
a search alone cannot tell an invisible repository from a misspelled
one, as both answer 422.

Like the release blockers in cilium/cilium the check is skipped for
pre-releases and release candidates, and it runs before the quay.io
check, which exits the process on a transport error.

Signed-off-by: André Martins <andre@cilium.io>
Pre-releases are development snapshots of the next minor version, and
neither the release candidate nor the minor template asks for the
security release blockers to be checked before cutting one.

This commit removes the item from the pre-release template, so that the
checklist matches the release tool, which skips that check for
pre-releases and release candidates.

Signed-off-by: André Martins <andre@cilium.io>
@aanm
aanm force-pushed the pr/check-security-release-blockers branch from 270541f to ecdc70e Compare October 15, 2026 09:33

@joestringer joestringer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, with some super minor nits for readability around the classic "double negative" case. I got confused for a bit trying to reason about this until I unwound per the suggestions below.

It would be good to test this with an upcoming release when we have a blocker to make sure that the implementation properly picks up the blockers when they're present (no typos or incorrect API handling).

Comment thread cmd/release/security.go
Comment on lines +146 to +149
// repoNotVisible reports whether err means the token cannot see the repository:
// GitHub answers 404 for a private repository it hides and 403 when an
// organization denies the token.
func repoNotVisible(err error) bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: repoVisible() and flip the logic?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same for searchRepoNotVisible() -> searchRepoVisible() below.

Comment thread cmd/release/security.go
Comment on lines +55 to +59
if !repoNotVisible(err) {
return fmt.Errorf("unable to fetch repository %s/%s: %w", owner, repo, err)
}
c.warnNotChecked(fmt.Sprintf("No access to the private %s/%s repository", owner, repo), releaseBlockerLabel)
return nil

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Flipping this around along with the corresponding suggestion earlier makes this flow much more clearly IMO.

Suggested change
if !repoNotVisible(err) {
return fmt.Errorf("unable to fetch repository %s/%s: %w", owner, repo, err)
}
c.warnNotChecked(fmt.Sprintf("No access to the private %s/%s repository", owner, repo), releaseBlockerLabel)
return nil
if !repoVisible(err) {
c.warnNotChecked(fmt.Sprintf("No access to the private %s/%s repository", owner, repo), releaseBlockerLabel)
return nil
}
return fmt.Errorf("unable to fetch repository %s/%s: %w", owner, repo, err)

This branch has not been deployed

No deployments
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