Skip to content

Update boilerplate - #285

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
abyrne55:update-boilerplate
May 11, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
abyrne55:update-boilerplate

Conversation

@abyrne55

@abyrne55 abyrne55 commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

Sync with latest boilerplate (61dbfdf)

Summary by CodeRabbit

  • Chores
    • Updated container base images to newer stable tags.
    • Configured code coverage targets: 35% for projects, 50% for pull requests (1% threshold).
    • Added pre-commit hooks for merge/conflict detection, formatting, YAML validation, secret scanning, Go lint/build checks, dependency drift, and RBAC wildcard checks.
    • Updated team ownership alias memberships.

@coderabbitai

coderabbitai Bot commented May 11, 2026 •

Copy link
Copy Markdown

Walkthrough

Updates CI/build base images, adds a repository pre-commit configuration, replaces disabled Codecov status with explicit targets, and removes three user aliases from OWNERS_ALIASES.

Changes

Build Infrastructure Updates

Layer / File(s) Summary
CI Operator Config
\.ci-operator\.yaml
build_root_image.tag changed from image-v8.3.4 → image-v8.3.6.
Builder Image in Dockerfile
build/Dockerfile
builder stage base image updated to quay.io/redhat-services-prod/openshift/boilerplate:image-v8.3.6.
Runtime Base Image
build/Dockerfile, build/Dockerfile.olm-registry
registry.access.redhat.com/ubi9/ubi-minimal tag updated from 9.7-1775623882 → 9.7-1778461551.

Developer Tooling & Project Configuration

Layer / File(s) Summary
Pre-commit Hooks
.pre-commit-config.yaml
New file adding Tier 1 shared hooks (merge conflict, whitespace, EOF fixer, YAML check), gitleaks secret scanning, golangci-lint with repo config, and local hooks for go build, go mod tidy drift check, and make rbac-wildcard-check (applies to deploy/ YAML).
Coverage Status
.codecov.yml
Replaces coverage.status.project: no and coverage.status.patch: no with explicit defaults: project.default.target: 35% / threshold: 1% and patch.default.target: 50% / threshold: 1%.

Ownership / Metadata

Layer / File(s) Summary
OWNERS_ALIASES
OWNERS_ALIASES
Removed abyrne55 from srep-functional-team-aurora and srep-functional-leads; removed jharrington22 from srep-architects.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 inconclusive)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error fips.go adds fmt.Println() in init() function, which writes non-JSON stdout at process startup, violating OTE Binary Stdout Contract requiring JSON-only stdout communication. Replace fmt.Println() with stderr logging. Change init() function to use logging redirected to stderr instead of stdout, such as setupLog.Info() or fmt.Fprintln(os.Stderr, ...).
Title check ❓ Inconclusive The title 'Update boilerplate' is vague and generic, using a non-descriptive term that doesn't convey meaningful information about the specific changeset despite the PR description mentioning syncing with latest boilerplate. Consider a more specific title that conveys the main changes, such as 'Sync boilerplate images and pre-commit configuration' or 'Update boilerplate image versions and add pre-commit hooks'.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Check not applicable. Repository uses standard Go testing, not Ginkgo. No Ginkgo tests exist in codebase and PR modifies only configuration and build files.
Test Structure And Quality ✅ Passed The custom check requires reviewing Ginkgo test code. However, tests in this PR use standard Go testing (testing.T), testify/assert, and gomock - NOT Ginkgo. The check is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR contains only infrastructure updates (config files and Dockerfile changes). MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests were added in this PR. The PR contains only standard Go unit tests using testing.T and testify, not Ginkgo e2e tests. The custom check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR updates boilerplate and image tags only. No scheduling constraints, affinity rules, topology spread constraints, or nodeSelectors targeting control-plane nodes were added or modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests added. Changes are configuration and build files only (.ci-operator.yaml, .codecov.yml, .pre-commit-config.yaml, OWNERS_ALIASES, Dockerfiles). Check not applicable.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2026

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
build/Dockerfile (1)

7-11: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Run the runtime image as non-root.

The final stage still defaults to root. That weakens container isolation and fails common policy checks.

Proposed hardening diff
 FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1778461551
 ENV OPERATOR_BIN=deadmanssnitch-operator
 
 WORKDIR /root/
 COPY --from=builder /go/src/github.com/openshift/deadmanssnitch-operator/build/_output/bin/${OPERATOR_BIN} /usr/local/bin/${OPERATOR_BIN}
+RUN chmod 0755 /usr/local/bin/${OPERATOR_BIN}
+USER 1001
 LABEL io.openshift.managed.name="deadmanssnitch-operator" \
       io.openshift.managed.description="Operator to manage Dead Man Snitches"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build/Dockerfile` around lines 7 - 11, The final image runs as root; update
the Dockerfile to create and switch to a non-root user for runtime: create a
dedicated user/group (e.g., "operator" or use UID/GID), ensure ownership of
runtime assets (the binary at /usr/local/bin/${OPERATOR_BIN} and any WORKDIR) is
set to that user, change WORKDIR from /root/ to a non-root directory owned by
that user, and add a USER instruction so the container runs with non-root
privileges; reference OPERATOR_BIN, WORKDIR, and the COPY target when making
these changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@build/Dockerfile`:
- Around line 7-11: The final image runs as root; update the Dockerfile to
create and switch to a non-root user for runtime: create a dedicated user/group
(e.g., "operator" or use UID/GID), ensure ownership of runtime assets (the
binary at /usr/local/bin/${OPERATOR_BIN} and any WORKDIR) is set to that user,
change WORKDIR from /root/ to a non-root directory owned by that user, and add a
USER instruction so the container runs with non-root privileges; reference
OPERATOR_BIN, WORKDIR, and the COPY target when making these changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a19d0b64-0eec-4478-8d76-03c54b8b1ac0

📥 Commits

Reviewing files that changed from the base of the PR and between 0a3ca8d and 986082d.

⛔ Files ignored due to path filters (8)
  • boilerplate/_data/backing-image-tag is excluded by !boilerplate/**
  • boilerplate/_data/last-boilerplate-commit is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/.codecov.yml is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/golangci.yml is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/pre-commit-config.yaml is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/standard.mk is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/update is excluded by !boilerplate/**
📒 Files selected for processing (6)
  • .ci-operator.yaml
  • .codecov.yml
  • .pre-commit-config.yaml
  • OWNERS_ALIASES
  • build/Dockerfile
  • build/Dockerfile.olm-registry
💤 Files with no reviewable changes (1)
  • OWNERS_ALIASES

@codecov-commenter

codecov-commenter commented May 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.28%. Comparing base (0a3ca8d) to head (ff793e8).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #285   +/-   ##
=======================================
  Coverage   43.28%   43.28%           
=======================================
  Files          11       11           
  Lines         834      834           
=======================================
  Hits          361      361           
  Misses        424      424           
  Partials       49       49           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@abyrne55
abyrne55 force-pushed the update-boilerplate branch from 986082d to ff793e8 Compare May 11, 2026 20:13

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
build/Dockerfile (1)

7-14: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Run the final image as non-root (and stop using /root as workdir).

The runtime stage still defaults to root because there is no USER directive, and WORKDIR /root/ makes non-root execution harder. Please switch to a non-root user in the final stage.

Suggested hardening diff
 FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1778461551
 ENV OPERATOR_BIN=deadmanssnitch-operator
 
-WORKDIR /root/
+WORKDIR /tmp
 COPY --from=builder /go/src/github.com/openshift/deadmanssnitch-operator/build/_output/bin/${OPERATOR_BIN} /usr/local/bin/${OPERATOR_BIN}
+USER 1001
 LABEL io.openshift.managed.name="deadmanssnitch-operator" \
       io.openshift.managed.description="Operator to manage Dead Man Snitches"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build/Dockerfile` around lines 7 - 14, The final Docker stage runs as root
and uses WORKDIR /root/, so update the final stage to run as a non-root user:
create a dedicated user/group (e.g., appuser), change WORKDIR from /root/ to a
non-privileged directory (e.g., /opt/${OPERATOR_BIN} or
/var/run/${OPERATOR_BIN}), COPY the built binary ${OPERATOR_BIN} into a location
owned by that user and chown it, and add a USER directive to switch to that
unprivileged user before runtime; ensure file permissions allow execution by
that user and that any runtime directories referenced by OPERATOR_BIN are
writable by the new user.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@build/Dockerfile`:
- Around line 7-14: The final Docker stage runs as root and uses WORKDIR /root/,
so update the final stage to run as a non-root user: create a dedicated
user/group (e.g., appuser), change WORKDIR from /root/ to a non-privileged
directory (e.g., /opt/${OPERATOR_BIN} or /var/run/${OPERATOR_BIN}), COPY the
built binary ${OPERATOR_BIN} into a location owned by that user and chown it,
and add a USER directive to switch to that unprivileged user before runtime;
ensure file permissions allow execution by that user and that any runtime
directories referenced by OPERATOR_BIN are writable by the new user.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3cf24e50-d11c-470f-8f98-2191e1ba2348

📥 Commits

Reviewing files that changed from the base of the PR and between 986082d and ff793e8.

⛔ Files ignored due to path filters (8)
  • boilerplate/_data/backing-image-tag is excluded by !boilerplate/**
  • boilerplate/_data/last-boilerplate-commit is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/.codecov.yml is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/golangci.yml is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/pre-commit-config.yaml is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/standard.mk is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/update is excluded by !boilerplate/**
📒 Files selected for processing (6)
  • .ci-operator.yaml
  • .codecov.yml
  • .pre-commit-config.yaml
  • OWNERS_ALIASES
  • build/Dockerfile
  • build/Dockerfile.olm-registry
💤 Files with no reviewable changes (1)
  • OWNERS_ALIASES
✅ Files skipped from review due to trivial changes (2)
  • .ci-operator.yaml
  • build/Dockerfile.olm-registry
🚧 Files skipped from review as they are similar to previous changes (2)
  • .codecov.yml
  • .pre-commit-config.yaml

@openshift-ci

openshift-ci Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

@abyrne55: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tnierman

Copy link
Copy Markdown

/lgtm
/approve
/meow

@openshift-ci

openshift-ci Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

@tnierman: cat image

Details

In response to this:

/lgtm
/approve
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 11, 2026
@openshift-ci

openshift-ci Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abyrne55, tnierman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants