MGMT-24455: upgrade to golang 1.26#843
Conversation
|
@shay23bra: This pull request references MGMT-24455 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn 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. |
WalkthroughGo toolchain directives and builder-stage images are upgraded to Go 1.26; golangci-lint version in the helper script is bumped to 2.11.4. ChangesGo 1.26 Toolchain Upgrade
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5 | ❌ 10❌ Failed checks (10 inconclusive)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shay23bra The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
Dockerfile.konflux (1)
20-53: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winAdd HEALTHCHECK directive for runtime container.
The Dockerfile is missing a
HEALTHCHECKinstruction. As per coding guidelines, container images should define a HEALTHCHECK to enable Kubernetes/OpenShift to monitor application health and perform automatic restarts when needed.🏥 Proposed HEALTHCHECK addition
Consider adding a health check before the ENTRYPOINT:
USER 65532:65532 ENV GODEBUG=madvdontneed=1 ENV GOGC=50 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD ["/usr/local/bin/manager", "healthz"] || exit 1 ENTRYPOINT ["/usr/local/bin/manager"]Note: Adjust the healthcheck command to match the actual health endpoint exposed by the manager.
🤖 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 `@Dockerfile.konflux` around lines 20 - 53, Add a HEALTHCHECK instruction to the Dockerfile (placed before ENTRYPOINT) that runs a lightweight command against the manager process (the /usr/local/bin/manager binary started by ENTRYPOINT) to verify liveness/readiness (e.g., an HTTP call to the manager's health endpoint or an exec script that returns 0 on success); configure sensible options (interval, timeout, start-period, retries) so Kubernetes/OpenShift can detect failures and restart the container when the health probe fails.Dockerfile (1)
22-37: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winAdd HEALTHCHECK directive for runtime container.
The Dockerfile is missing a
HEALTHCHECKinstruction. As per coding guidelines, container images should define a HEALTHCHECK to enable container orchestrators to monitor application health and restart unhealthy containers.🏥 Proposed HEALTHCHECK addition
Consider adding a health check before the ENTRYPOINT. The exact endpoint will depend on what the manager exposes:
USER 65532:65532 ENV GODEBUG=madvdontneed=1 ENV GOGC=50 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD ["/usr/local/bin/manager", "healthz"] || exit 1 ENTRYPOINT ["/usr/local/bin/manager"]Note: Adjust the healthcheck command based on the actual health endpoint provided by the manager binary.
🤖 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 `@Dockerfile` around lines 22 - 37, Add a Docker HEALTHCHECK instruction immediately before the ENTRYPOINT to allow orchestrators to monitor the manager process; call the manager's health endpoint or run a lightweight probe that verifies the binary started correctly (for example an HTTP GET against the manager's /health or an exec that checks responsiveness), and include conservative interval, timeout and retries options (e.g., --interval, --timeout, --start-period, --retries) so failures cause container to be marked unhealthy; ensure the probe command targets the same binary referenced by ENTRYPOINT ("/usr/local/bin/manager") and works with the non-root USER 65532:65532 in the image.
🤖 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 `@Dockerfile`:
- Around line 22-37: Add a Docker HEALTHCHECK instruction immediately before the
ENTRYPOINT to allow orchestrators to monitor the manager process; call the
manager's health endpoint or run a lightweight probe that verifies the binary
started correctly (for example an HTTP GET against the manager's /health or an
exec that checks responsiveness), and include conservative interval, timeout and
retries options (e.g., --interval, --timeout, --start-period, --retries) so
failures cause container to be marked unhealthy; ensure the probe command
targets the same binary referenced by ENTRYPOINT ("/usr/local/bin/manager") and
works with the non-root USER 65532:65532 in the image.
In `@Dockerfile.konflux`:
- Around line 20-53: Add a HEALTHCHECK instruction to the Dockerfile (placed
before ENTRYPOINT) that runs a lightweight command against the manager process
(the /usr/local/bin/manager binary started by ENTRYPOINT) to verify
liveness/readiness (e.g., an HTTP call to the manager's health endpoint or an
exec script that returns 0 on success); configure sensible options (interval,
timeout, start-period, retries) so Kubernetes/OpenShift can detect failures and
restart the container when the health probe fails.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8fc1e25b-7aed-44ec-932d-5e11f1405687
📒 Files selected for processing (4)
DockerfileDockerfile.konfluxgo.modhack/golangci-lint.sh
d78d800 to
c169b64
Compare
|
/retest |
|
@shay23bra: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
https://redhat.atlassian.net/browse/MGMT-24455