Skip to content

NO-JIRA: chore: make cross build consistent across plugins#355

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
jgbernalp:make-cross-build-consistent
Mar 5, 2026
Merged

NO-JIRA: chore: make cross build consistent across plugins#355
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
jgbernalp:make-cross-build-consistent

Conversation

@jgbernalp
Copy link
Contributor

@jgbernalp jgbernalp commented Mar 4, 2026

Summary by CodeRabbit

  • Chores
    • Updated the Go builder base image to the latest stable version to ensure better compatibility with current platform standards
    • Expanded the build process with enhanced cross-platform compilation capabilities for improved system flexibility
    • Introduced a new features configuration variable to provide greater control in build customization

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@openshift-ci-robot
Copy link

@jgbernalp: This pull request explicitly references no jira issue.

Details

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Walkthrough

The changes update the Go builder base image to a newer OpenShift image and modify the Makefile's cross-build target and variables. The Dockerfile switches from a Red Hat registry image to an OpenShift CI registry image with updated Go and OpenShift versions. The Makefile introduces a new cross-build implementation using Podman manifests and adds a FEATURES variable.

Changes

Cohort / File(s) Summary
Dockerfile Go Builder Image
Dockerfile
Updated base image for go-builder stage from brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24 to registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22, changing source registry and Go/OpenShift versions.
Makefile Build Configuration
Makefile
Replaced podman-cross-build target with new implementation using Podman manifest create/push workflow. Added new FEATURES variable for configurable build features.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Test code violates quality requirements: TypeScript tests bundle multiple unrelated cases in single blocks using forEach patterns; assertions lack descriptive failure messages; Go tests test four endpoints in one function; timeout mechanism uses hardcoded iterations instead of context-based timeouts. Refactor tests to separate it() blocks for each case, add descriptive assertion messages, split multi-endpoint test functions, and replace polling loops with context-based timeouts using context.WithTimeout().
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: updating cross-build configuration to be consistent across plugins. It accurately reflects the modifications to Dockerfile and Makefile that standardize the build process.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed The custom check for stable and deterministic test names is not applicable to this PR. The PR only modifies build configuration files (Dockerfile and Makefile) with no test code or test name declarations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jgbernalp
Copy link
Contributor Author

/cherry-pick release-6.1

@openshift-cherrypick-robot

@jgbernalp: once the present PR merges, I will cherry-pick it on top of release-6.1 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-6.1

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 requested review from PeterYurkovich and zhuje March 4, 2026 10:21
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
Makefile (1)

81-83: Optional: align with checkmake minphony expectations.

Static analysis reports missing phony all, clean, and test. If checkmake is gating, add lightweight aliases to avoid future lint friction.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 81 - 83, Add lightweight phony aliases required by
checkmake by updating the Makefile to declare .PHONY for the common targets and
adding minimal implementations for them; specifically add .PHONY: all clean test
deploy (or a minphony target if your lint config expects it) and implement
simple no-op bodies such as "all: ;" "clean: ;" and "test: ;" (leave existing
deploy as-is) so static analysis no longer flags missing phony targets.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile`:
- Line 15: The project has a Go version mismatch: the Dockerfile uses Go 1.25
(FROM ... golang-1.25 ...) while go.mod declares "go 1.24.0"; update the go
directive in go.mod to "1.25" to match the Dockerfile (or alternatively change
the Dockerfile FROM back to golang-1.24 if you must remain on 1.24), and ensure
Dockerfile.ci’s Go version is aligned as well so all build descriptors (go.mod
'go' directive, Dockerfile FROM tag, and Dockerfile.ci) reference the same Go
minor version.

---

Nitpick comments:
In `@Makefile`:
- Around line 81-83: Add lightweight phony aliases required by checkmake by
updating the Makefile to declare .PHONY for the common targets and adding
minimal implementations for them; specifically add .PHONY: all clean test deploy
(or a minphony target if your lint config expects it) and implement simple no-op
bodies such as "all: ;" "clean: ;" and "test: ;" (leave existing deploy as-is)
so static analysis no longer flags missing phony targets.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: cf758217-a327-46cb-91d8-3bd2989019c0

📥 Commits

Reviewing files that changed from the base of the PR and between 30ac889 and 3af61a0.

📒 Files selected for processing (2)
  • Dockerfile
  • Makefile

RUN make build-frontend

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24 as go-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS go-builder
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find all Dockerfiles in the repo
echo "=== Dockerfile inventory ==="
fd -type f -name 'Dockerfile*' | head -20

echo -e "\n=== Dockerfile.ci builder image ==="
if [ -f Dockerfile.ci ]; then
  rg -n 'FROM.*golang-1\.(24|25)-openshift-4\.(20|22)' Dockerfile.ci || echo "No match found"
  # Show broader context around builder image
  sed -n '25,35p' Dockerfile.ci 2>/dev/null || echo "File read failed or too short"
fi

echo -e "\n=== go.mod Go version declaration ==="
if [ -f go.mod ]; then
  head -20 go.mod | rg -n '^go\s+[0-9]+\.[0-9]+' || echo "No match in first 20 lines"
fi

echo -e "\n=== Dockerfile.ci references in codebase ==="
rg -l 'Dockerfile\.ci' | head -10

echo -e "\n=== CI config references to Dockerfile.ci ==="
find . -type f \( -name '*.yml' -o -name '*.yaml' -o -name '*.sh' \) -exec rg -l 'Dockerfile\.ci' {} + 2>/dev/null | head -10

Repository: openshift/logging-view-plugin

Length of output: 289


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find all Dockerfiles in the repo (corrected syntax)
echo "=== Dockerfile inventory ==="
fd -type file -name 'Dockerfile*' | head -20

echo -e "\n=== Dockerfile.ci builder image ==="
if [ -f Dockerfile.ci ]; then
  echo "File exists. Checking builder image..."
  rg -n 'FROM.*golang' Dockerfile.ci || echo "No golang builder found"
else
  echo "Dockerfile.ci not found in root"
fi

echo -e "\n=== Dockerfile main builder image ==="
if [ -f Dockerfile ]; then
  rg -n 'FROM.*golang' Dockerfile || echo "No golang builder found"
fi

echo -e "\n=== go.mod Go version declaration ==="
if [ -f go.mod ]; then
  head -20 go.mod
fi

echo -e "\n=== Search for Dockerfile.ci references ==="
rg 'Dockerfile\.ci' 2>/dev/null | head -20 || echo "No references found"

Repository: openshift/logging-view-plugin

Length of output: 289


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find all Dockerfiles in the repo
echo "=== Dockerfile files in root ==="
ls -la Dockerfile* 2>/dev/null || echo "No Dockerfile* files found"

echo -e "\n=== Dockerfile main builder image ==="
if [ -f Dockerfile ]; then
  grep -n 'FROM.*golang' Dockerfile || echo "No golang builder found"
fi

echo -e "\n=== Dockerfile.ci builder image ==="
if [ -f Dockerfile.ci ]; then
  grep -n 'FROM.*golang' Dockerfile.ci || echo "No golang builder found"
else
  echo "Dockerfile.ci not found"
fi

echo -e "\n=== go.mod Go version ==="
if [ -f go.mod ]; then
  head -20 go.mod
fi

echo -e "\n=== Search for Dockerfile.ci references ==="
grep -r 'Dockerfile\.ci' . --include='*.yml' --include='*.yaml' --include='*.sh' --include='*.md' 2>/dev/null | head -20 || echo "No references found"

Repository: openshift/logging-view-plugin

Length of output: 1403


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== References to main Dockerfile in CI/build config ==="
grep -r 'Dockerfile[^.]' . --include='*.yml' --include='*.yaml' --include='*.sh' --include='*.md' 2>/dev/null | grep -v Dockerfile.ci | head -20 || echo "No references found"

echo -e "\n=== Full Dockerfile.ci content (first 35 lines) ==="
head -35 Dockerfile.ci

echo -e "\n=== Full Dockerfile content (first 20 lines) ==="
head -20 Dockerfile

Repository: openshift/logging-view-plugin

Length of output: 1604


Update go.mod to match main Dockerfile Go version.

Line 15 upgrades the main builder to Go 1.25/OCP 4.22, but go.mod still declares go 1.24.0. This mismatch should be resolved by updating go.mod to 1.25 or reverting the Dockerfile to Go 1.24/OCP 4.20 if the earlier version is intentionally required. Dockerfile.ci (Line 31) uses Go 1.24, but no CI references to it were found, suggesting it may be legacy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile` at line 15, The project has a Go version mismatch: the Dockerfile
uses Go 1.25 (FROM ... golang-1.25 ...) while go.mod declares "go 1.24.0";
update the go directive in go.mod to "1.25" to match the Dockerfile (or
alternatively change the Dockerfile FROM back to golang-1.24 if you must remain
on 1.24), and ensure Dockerfile.ci’s Go version is aligned as well so all build
descriptors (go.mod 'go' directive, Dockerfile FROM tag, and Dockerfile.ci)
reference the same Go minor version.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 4, 2026

@jgbernalp: 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.

@anpingli
Copy link
Contributor

anpingli commented Mar 4, 2026

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Mar 4, 2026
@PeterYurkovich
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, PeterYurkovich

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:
  • OWNERS [PeterYurkovich,jgbernalp]

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

@openshift-merge-bot openshift-merge-bot bot merged commit 390080c into openshift:main Mar 5, 2026
7 checks passed
@openshift-cherrypick-robot

@jgbernalp: #355 failed to apply on top of branch "release-6.1":

Applying: chore: make cross build consistent across plugins
Using index info to reconstruct a base tree...
M	Makefile
Falling back to patching base and 3-way merge...
Auto-merging Makefile
CONFLICT (content): Merge conflict in Makefile
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 chore: make cross build consistent across plugins

Details

In response to this:

/cherry-pick release-6.1

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.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants