Update build root and run go fix#776
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (9)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📝 WalkthroughWalkthroughThis PR modernizes utility patterns: replaces custom loops/concatenation with Go stdlib helpers (slices, strings.Builder, SplitSeq, CutPrefix, wg.Go), removes ChangesGo Stdlib and Efficiency Modernization
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlexNPavel The full list of commands accepted by this bot can be found here. The pull request process is described 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cmd/release-controller-api/http.go (1)
709-766: sync.WaitGroup.Go is valid under Go 1.26 (introduced in Go 1.25)
wg.Go(...)on async.WaitGroupis not a Go 1.26-only addition—it was introduced in Go 1.25—so this should compile when building with Go 1.26. The remaining concern is just consistency: the same block uses bothwg.Add(1)/defer wg.Done()(lines 696-707) andwg.Go(...)(lines 709-766).🤖 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 `@cmd/release-controller-api/http.go` around lines 709 - 766, The code mixes two waitgroup patterns (wg.Add(1)/defer wg.Done() and wg.Go(...)); pick one for consistency and apply it to both blocks: either convert the earlier block that uses wg.Add(1)/defer wg.Done() to use wg.Go(func() { ... }) or change this wg.Go(...) block to follow the wg.Add/Done pattern. Locate the uses of wg.Add, wg.Done and wg.Go and make them consistent (prefer wg.Go where closures are used to avoid forgetting Done), keeping the same closure body and preserving context checks and the nodeImageErr/nodeImageStreams assignments.
🤖 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.
Inline comments:
In `@pkg/release-controller/types.go`:
- Line 56: The ChangeLogJson field in the release struct (ChangeLogJson
ChangeLog) was changed to always serialize which causes an empty ChangeLog to be
returned when renderJSON.err != nil; revert this unintended API-breaking change
by restoring the omitempty tag on the ChangeLogJson field
(json:"changeLogJson,omitempty") in pkg/release-controller/types.go or
alternatively make ChangeLogJson a pointer and ensure the handler in
cmd/release-controller-api/http.go sets it to nil when renderJSON.err != nil so
the field is omitted — update the struct tag or the handler logic around
renderJSON.err accordingly.
---
Nitpick comments:
In `@cmd/release-controller-api/http.go`:
- Around line 709-766: The code mixes two waitgroup patterns (wg.Add(1)/defer
wg.Done() and wg.Go(...)); pick one for consistency and apply it to both blocks:
either convert the earlier block that uses wg.Add(1)/defer wg.Done() to use
wg.Go(func() { ... }) or change this wg.Go(...) block to follow the wg.Add/Done
pattern. Locate the uses of wg.Add, wg.Done and wg.Go and make them consistent
(prefer wg.Go where closures are used to avoid forgetting Done), keeping the
same closure body and preserving context checks and the
nodeImageErr/nodeImageStreams assignments.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 481943a9-186a-4683-bff5-10f3bba69fe2
📒 Files selected for processing (9)
.ci-operator.yamlcmd/release-controller-api/http.gopkg/cmd/release-mirror-cleanup-controller/controller.gopkg/cmd/release-reimport-controller/controller.gopkg/jira/jira.gopkg/jira/jira_test.gopkg/release-controller/machine_os_tags.gopkg/release-controller/prowjob.gopkg/release-controller/types.go
Update build root image to golang 1.26 and run the `go fix` command on the project.
|
@coderabbitai summary |
✅ Action performedSummary regeneration triggered. |
|
@AlexNPavel: 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. |
Update build root image to golang 1.26 and run the
go fixcommand on the project.Summary by CodeRabbit
Refactor
Chores