Skip to content

Upgrade Go to 1.26.3#2050

Open
thomasmaas wants to merge 1 commit into
mainfrom
upgrade-go-1.26.3
Open

Upgrade Go to 1.26.3#2050
thomasmaas wants to merge 1 commit into
mainfrom
upgrade-go-1.26.3

Conversation

@thomasmaas

@thomasmaas thomasmaas commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Upgrade Go from 1.25.9 to 1.26.3.

Changes:

  • go.mod: updated go directive from 1.25.9 to 1.26.3
  • Dockerfile: updated builder image from golang:1.25 to golang:1.26

Summary by CodeRabbit

  • Chores

    • Updated the Go toolchain to 1.26.3.
    • Upgraded the local golangci-lint tool version to v2.12.2.
  • Refactor

    • Improved CEL string assembly internals without changing the resulting output.
  • Tests

    • Streamlined test environment setup for CEL extensions with equivalent behaviour.

Signed-off-by: Thomas Maas <thomas@webtypes.com>
@thomasmaas thomasmaas added the area/dependencies Changes dependencies label Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@thomasmaas, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 32 minutes and 22 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dea5bcec-086f-4cfe-98fb-c51cc0563f52

📥 Commits

Reviewing files that changed from the base of the PR and between 9ce8b64 and 5a64015.

📒 Files selected for processing (11)
  • api/v1/common_types.go
  • api/v1beta1/topology.go
  • cmd/extensions/oidc-policy/internal/controller/oidcpolicy_reconciler.go
  • cmd/extensions/plan-policy/api/v1alpha1/planpolicy_types.go
  • internal/controller/consoleplugin_reconciler.go
  • internal/controller/ratelimit_workflow_helpers.go
  • internal/controller/route_policy_discoverability_reconciler.go
  • internal/controller/state_of_the_world.go
  • internal/policymachinery/utils.go
  • pkg/cel/ext/kuadrant_test.go
  • pkg/extension/controller/builder.go
📝 Walkthrough

Walkthrough

Go toolchain is upgraded from 1.25/1.25.9 to 1.26/1.26.3 across Dockerfile and go.mod. Golangci-lint is bumped from v2.7.2 to v2.12.2 with installation switched to version-pinned release URLs. Two utility functions are refactored: CEL tier list building now uses fmt.Fprintf directly, and test environment setup preallocates slice capacity.

Changes

Go 1.26 and Build Toolchain Updates

Layer / File(s) Summary
Go 1.26 version update
Dockerfile, go.mod
Builder stage base image updated from golang:1.25 to golang:1.26; go directive updated from 1.25.9 to 1.26.3.
Golangci-lint version and installation upgrade
Makefile
GOLANGCI_LINT_VERSION bumped from v2.7.2 to v2.12.2; installation recipe changed to fetch install.sh from version-pinned release path instead of master branch.
CEL tier list string building refactoring
cmd/extensions/plan-policy/api/v1alpha1/planpolicy_types.go
PlanPolicy.BuildCelExpression refactored to write tier list and predicate strings using fmt.Fprintf into strings.Builder instead of fmt.Sprintf with WriteString calls.
Test environment slice allocation refactoring
pkg/cel/ext/kuadrant_test.go
testKuadrantEnv refactored to preallocate baseOpts slice with computed capacity instead of using literal single-element slice.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • eguzki

Poem

🐇 Four changes hippety-bound,
New versions and refactors abound!
From Go 1.25 to 1.26 we spring,
With linters and builders—a toolchain thing.
The rabbit hops onward, optimised and bright! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly and accurately summarizes the main change: upgrading Go from version 1.25.9 to 1.26.3 across multiple configuration files.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upgrade-go-1.26.3

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.

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

🧹 Nitpick comments (1)
Dockerfile (1)

6-6: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Pin the builder image to golang:1.26.3 to match the module toolchain declaration.

Using golang:1.26 keeps builds on a floating patch line, which can make image builds non-reproducible versus go.mod (go 1.26.3). Prefer pinning the Docker base image to the same patch level.

Suggested diff
-FROM --platform=$BUILDPLATFORM golang:1.26 AS builder
+FROM --platform=$BUILDPLATFORM golang:1.26.3 AS builder
🤖 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` at line 6, Update the golang base image version in the FROM
statement from golang:1.26 to golang:1.26.3 to match the go.mod toolchain
declaration and ensure reproducible builds by pinning to the exact patch version
rather than a floating patch line.
🤖 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.

Nitpick comments:
In `@Dockerfile`:
- Line 6: Update the golang base image version in the FROM statement from
golang:1.26 to golang:1.26.3 to match the go.mod toolchain declaration and
ensure reproducible builds by pinning to the exact patch version rather than a
floating patch line.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a70e304f-b5ad-4a38-b1ea-34a0a874ab4f

📥 Commits

Reviewing files that changed from the base of the PR and between b199cd1 and 7145d99.

📒 Files selected for processing (2)
  • Dockerfile
  • go.mod

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.71%. Comparing base (c821eb0) to head (3012a35).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...troller/route_policy_discoverability_reconciler.go 0.00% 2 Missing ⚠️
api/v1/common_types.go 0.00% 1 Missing ⚠️
api/v1beta1/topology.go 0.00% 1 Missing ⚠️
pkg/extension/controller/builder.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (c821eb0) and HEAD (3012a35). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (c821eb0) HEAD (3012a35)
envoygateway-integration 1 0
controllers-integration 3 0
istio-integration 2 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2050       +/-   ##
===========================================
- Coverage   75.14%   45.71%   -29.44%     
===========================================
  Files         127      127               
  Lines       12626    12628        +2     
===========================================
- Hits         9488     5773     -3715     
- Misses       2659     6531     +3872     
+ Partials      479      324      -155     
Flag Coverage Δ
bare-k8s-integration 20.13% <39.13%> (-0.01%) ⬇️
controllers-integration ?
envoygateway-integration ?
gatewayapi-integration 16.05% <39.13%> (-0.09%) ⬇️
istio-integration ?
unit 28.69% <41.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api (u) 35.34% <0.00%> (-50.54%) ⬇️
internal (u) 46.79% <90.47%> (-29.80%) ⬇️
pkg (u) 39.13% <0.00%> (ø)
Files with missing lines Coverage Δ
internal/controller/consoleplugin_reconciler.go 80.51% <100.00%> (ø)
internal/controller/ratelimit_workflow_helpers.go 55.55% <100.00%> (-24.93%) ⬇️
internal/controller/state_of_the_world.go 72.61% <100.00%> (-10.85%) ⬇️
internal/policymachinery/utils.go 90.42% <100.00%> (-4.79%) ⬇️
api/v1/common_types.go 0.00% <0.00%> (-100.00%) ⬇️
api/v1beta1/topology.go 85.71% <0.00%> (-7.94%) ⬇️
pkg/extension/controller/builder.go 38.82% <0.00%> (ø)
...troller/route_policy_discoverability_reconciler.go 17.96% <0.00%> (-77.31%) ⬇️

... and 65 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thomasmaas thomasmaas force-pushed the upgrade-go-1.26.3 branch 4 times, most recently from 5a64015 to 7145d99 Compare June 22, 2026 11:23
@thomasmaas

Copy link
Copy Markdown
Contributor Author

Needs a rebase once #2052 has been merged

@eguzki

eguzki commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

#2052 has been merged. Rebase to go

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

Labels

area/dependencies Changes dependencies

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants