Skip to content

Fail PR build if any image SHA placeholders are found - #179

Merged
robobario merged 1 commit into
kroxylicious:mainfrom
robobario:block-release-on-placeholder-shas
Aug 4, 2025
Merged

Fail PR build if any image SHA placeholders are found#179
robobario merged 1 commit into
kroxylicious:mainfrom
robobario:block-release-on-placeholder-shas

Conversation

@robobario

Copy link
Copy Markdown
Member

The intent is to prevent documentation PRs from merging until we manually update the PR with the SHAs.

See matching PR kroxylicious/kroxylicious#2529

The image shas are only available after the image build, which happens in response to the release tag being pushed up. So they are not available at the point we are currently creating the documentation PR.

The intent is to prevent documentation PRs from merging until we
manually update the PR with the SHAs.

Signed-off-by: Robert Young <robertyoungnz@gmail.com>
@robobario
robobario force-pushed the block-release-on-placeholder-shas branch from 906d4a6 to daf99ff Compare August 4, 2025 22:07

@tombentley tombentley 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.

A couple of nits, otherwise LGTM. Thanks.

- name: Require release manifests to contain non-placeholder container image SHAs
run: |
PLACEHOLDER="REPLACE_WITH_SHA_AFTER_IMAGE_RELEASE"
# || true prevents the script failing when 0 matches are found

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.

Is the || true part commented out code?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yep, it's a comment on why we've got to include an || true, so that githubs set -e doesn't fail the script fast.

run: |
PLACEHOLDER="REPLACE_WITH_SHA_AFTER_IMAGE_RELEASE"
# || true prevents the script failing when 0 matches are found
matching_files=$(grep -r -l "${PLACEHOLDER}" _data/release/ || true)

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.

I guess for should add -F, because you've not said that PLACEHOLDER is intended to be a regex.

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.

Some how I didn't connect it up with the following line. I would write this as

# The `|| true` below prevents the script failing when 0 matches are found

But I don't think it's worth a PR to change it.

@robobario
robobario merged commit eb0423d into kroxylicious:main Aug 4, 2025
2 checks passed
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