ROX-35006: Update Go 1.26#20750
Conversation
87f1fa0 to
58db776
Compare
🚀 Build Images ReadyImages are ready for commit ca6005f. To use with deploy scripts: export MAIN_IMAGE_TAG=4.12.x-201-gca6005ff6c |
fc2686e to
1ec1982
Compare
|
/retest |
e15aafa to
1504624
Compare
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Update openshift-golang-builder from rhel_9_golang_1.25 to rhel_9_golang_1.26 (brew buildID 4026077, Go 1.26.3). Partially generated by AI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align all operator/tools/*/go.mod with the target Go version. Partially generated by AI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Was at go 1.24 with a stale toolchain directive. Partially generated by AI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The guide duplicates information that belongs in commit messages and PR descriptions rather than a standalone document. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Five Konflux Dockerfiles still referenced rhel_9_golang_1.25. Updated to rhel_9_golang_1.26 (brew buildID 4026077) to match the builder already used in .konflux/ and .tekton/. Partially generated by AI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable the modernize linter (previously disabled with TODO ROX-35007) and add newexpr to the disabled checks list alongside existing ones. Partially generated by AI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Go 1.26 url.Parse rejects unbracketed IPv6 addresses. Instead of working around this, accept the stricter validation and require bracketed format (e.g. [2001:db8::1]:443). No real Docker registry endpoint uses unbracketed IPv6. Partially generated by AI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Tomasz Janiszewski <janiszt@gmail.com>
acd2588 to
4beb9b6
Compare
|
/retest |
|
/konflux-retest operator-bundle-on-push |
|
/retest |
|
/konflux-retest operator-index-on-push |
|
/konflux-retest operator-bundle-on-push |
1 similar comment
|
/konflux-retest operator-bundle-on-push |
|
/konflux-retest operator-index-on-push |
|
/konflux-retest create-custom-snapshot |
Backport of #20750. Applies Go 1.26 compatibility fixes required after ROX-35288 bumped the compiler to 1.26.3: - URL parser: Go 1.26 validates port syntax before URL escapes - IPv6 validation: url.Parse now requires bracketed IPv6 per RFC 2732 - govet printf: %q → %v for []int (stricter format checking) - Goroutine scheduling: increased prune timeout for Go 1.26 scheduler - golangci: updated Go version to 1.26 - All tool go.mod files bumped to go 1.26.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backport of #20750. Applies Go 1.26 compatibility fixes required after ROX-35288 bumped the compiler to 1.26.3: - URL parser: Go 1.26 validates port syntax before URL escapes - IPv6 validation: url.Parse now requires bracketed IPv6 per RFC 2732 - govet printf: %q → %v for []int (stricter format checking) - Goroutine scheduling: increased prune timeout for Go 1.26 scheduler - golangci: updated Go version to 1.26 - All tool go.mod files bumped to go 1.26.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backport of #20750. Applies Go 1.26 compatibility fixes required after ROX-35288 bumped the compiler to 1.26.3: - URL parser: Go 1.26 validates port syntax before URL escapes - IPv6 validation: url.Parse now requires bracketed IPv6 per RFC 2732 - govet printf: %q → %v for []int (stricter format checking) - Goroutine scheduling: increased prune timeout for Go 1.26 scheduler - golangci: updated Go version to 1.26 - All tool go.mod files bumped to go 1.26.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Go 1.26 introduced the newexpr check in golangci-lint's modernize linter. The codebase on release-4.11 hasn't been updated for this rule, so disable it to match what was done on master in #20750. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upgrade Go from 1.25.8 to 1.26.3 across the entire codebase, including all tool modules, operator tool modules, Konflux/Tekton builder images, and scanner/hack/quay.
Changes
Version bumps
Fixes required for Go 1.26 compatibility
pkg/clientconn/client_test.go): Go 1.26 validates port syntax before checking URL escapes, changing the error priority. Updated test expectation from"invalid URL escape"to"invalid port after host".pkg/tlscheck/tlscheck.go): Go 1.26'surl.Parse()now requires IPv6 addresses to be bracketed per RFC 2732. StackRox accepts unbracketed IPv6 including ambiguousIPv6:portformats. Fixed by routing IPv6 addresses throughnetutil.ParseEndpoint()instead ofurl.Parse(), and adding explicit whitespace validation.pkg/env/integersetting.go): Changed%qto%vfor[]int—%qis for strings and Go 1.26's stricter govet catches the mismatch. (pkg/grpc/testutils.go): Added...when forwarding variadic arguments to prevent treating a slice as a single argument.central/processindicator/datastore/datastore_impl_test.go): IncreasedWaitWithTimeoutfrom3*prunePeriod(300ms) to5*prunePeriod(500ms) on the prune path that includes a DB delete — the slowest path that's sensitive to Go 1.26's scheduling changes.