Skip to content

build: upgrade Go toolchain from 1.25.7 to 1.26.4 - #1287

Merged
lklimek merged 6 commits into
v1.6-devfrom
chore/upgrade-go-1.26.1
Jun 12, 2026
Merged

lklimek merged 6 commits into
v1.6-devfrom
chore/upgrade-go-1.26.1

Conversation

@lklimek

@lklimek lklimek commented Mar 18, 2026 •

Copy link
Copy Markdown
Collaborator

Why this PR exists

What was done

  • Go toolchain 1.25.7 → 1.26.4 across every version-pinned file: go.mod, the CI workflows + BLS composite action, the three Dockerfiles, README.md, and the tutorial/fuzz docs.
  • Tooling bumps required by Go 1.26 — dev tools that parse Go source must themselves be built with Go ≥ 1.26 to handle a 1.26 target:
    • golangci-lint action pin v2.8 → v2.12 — the v2.8 binary is built with Go 1.24 and refuses to lint a 1.26 target (build-Go < target-Go guard).
    • mockery pin 3.5.4 → 3.7.0 (in .github/workflows/check-generated.yml and scripts/mockery_generate.sh) — 3.5.4 is built with Go 1.25 and cannot load Go 1.26 packages; mocks regenerate byte-identically with 3.7.0, so no generated output changes.
  • Go 1.26 stricter go vet (printf analyzer now fails the build) — fixed two %q verbs applied to non-string args:
    • rpc/jsonrpc/server/ws_handler_test.go — int HTTP status codes → %d
    • scripts/keymigrate/migrate.go — keyType value → %v

Testing

Breaking changes

None — toolchain and tooling/version bumps plus two test/format-string fixes; no application logic changes.

Checklist

  • Self-review performed
  • CI green on the target toolchain
  • Corresponding docs updated (README, tutorials, fuzz README)

Attribution

🤖 Co-authored by Claudius the Magnificent AI Agent

Summary by CodeRabbit

  • Chores
    • Bumped Go toolchain requirement to 1.26.4 across CI workflows, build configs, Docker images, and module metadata.
    • Updated tooling versions used in automation (lint action and mockery).
  • Documentation
    • Updated examples and minimum-requirements docs to reflect Go 1.26.4.
  • Tests
    • Minor test assertion/message formatting tweaks to improve failure output.

lklimek and others added 2 commits March 18, 2026 09:15
Required for oasis-core/go v0.2600.0 which declares go 1.26.0.
Updates go.mod, CI workflows, and Dockerfiles.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Updates remaining Go 1.25.7 references in README, tutorials,
fuzz README, and BLS GitHub action to 1.26.1.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@coderabbitai

coderabbitai Bot commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 25ef7ffb-a30b-4332-8700-ae25405dd770

📥 Commits

Reviewing files that changed from the base of the PR and between 8a9bee5 and c344410.

📒 Files selected for processing (2)
  • .github/workflows/check-generated.yml
  • scripts/mockery_generate.sh
✅ Files skipped from review due to trivial changes (1)
  • scripts/mockery_generate.sh

📝 Walkthrough

Walkthrough

This PR updates Go version references to 1.26.4 across CI workflows, a composite action, Dockerfiles, go.mod, and documentation, and makes two minor test/error-message formatting adjustments. No behavioral or public API changes.

Changes

Go toolchain bump

Layer / File(s) Summary
CI workflows & action metadata
.github/actions/bls/action.yml, .github/workflows/build.yml, .github/workflows/check-generated.yml, .github/workflows/e2e.yml, .github/workflows/lint.yml, .github/workflows/release.yml, .github/workflows/tests.yml
Updated actions/setup-go references to 1.26.4 (multiple jobs); bumped golangci-lint-action to v2.12 and MOCKERY/mockery to v3.7.0.
Docker images and build ARGs
DOCKER/Dockerfile, test/docker/Dockerfile, test/e2e/docker/Dockerfile
Updated Docker build ARGs / FROM images to use Go 1.26.4.
go.mod and documentation examples
go.mod, README.md, docs/tutorials/go-built-in.md, docs/tutorials/go.md, test/fuzz/README.md
Bumped go directive and documentation example mentions to 1.26.4.
Test/message formatting tweaks
rpc/jsonrpc/server/ws_handler_test.go, scripts/keymigrate/migrate.go
Adjusted assertion/error message formatting (%d/%v replacements); no logic changes.
Mockery helper script
scripts/mockery_generate.sh
Updated the mockery version constant to v3.7.0 used when generating mocks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A gentle hop from old to new,
Go versions swapped — a tidy view.
Workflows, Docker, docs all sing,
Tests whisper clearer things.
Tiny paws, a happy spring!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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 PR title accurately describes the main change: upgrading the Go toolchain version across all build configurations and workflows.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/upgrade-go-1.26.1

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
Contributor

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 (2)
test/docker/Dockerfile (1)

1-42: Run the test image as a non-root user.

From Line 1 onward, there is no USER instruction, so runtime defaults to root. This can fail policy gates and hide permission issues during tests.

🔒 Proposed hardening
 # Now copy in the code
 # NOTE: this will overwrite whatever is in vendor/
 COPY . $REPO
 
+RUN useradd --create-home --uid 10001 tenderdash && \
+    chown -R tenderdash:tenderdash $REPO
+USER tenderdash
+
 # expose the volume for debugging
 VOLUME $REPO
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/docker/Dockerfile` around lines 1 - 42, The Dockerfile currently leaves
the container running as root; create and switch to a non-root user (e.g., add a
dedicated user/group and use USER) and ensure $REPO ownership/permissions are
set so that subsequent runtime operations (tenderdash testnet, VOLUME $REPO,
exposed ports) work without root: during image build (before the final
COPY/VOLUME/EXPOSE and before invoking tenderdash for the test data or at the
end of the file) create the user/group, chown $REPO and any bin dirs (GOBIN) to
that user, and add a USER instruction to run the container as that non-root user
while keeping privileged install steps (make tools, make install, install_abci)
executed as root earlier in the Dockerfile so builds succeed.
.github/workflows/lint.yml (1)

43-43: Pin exact Go version in lint workflow for deterministic CI.

Line 43 uses ^1.26.1, which can drift to newer 1.x releases. All other workflows pin to "1.26.1" exactly; align this for consistency.

♻️ Proposed change
-          go-version: "^1.26.1"
+          go-version: "1.26.1"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/lint.yml at line 43, The lint workflow currently pins Go
using a caret range ("^1.26.1") which allows unintended upgrades; change the
go-version setting from "^1.26.1" to the exact string "1.26.1" so it matches
other workflows and ensures deterministic CI (update the value referenced as
go-version in the lint workflow).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/actions/bls/action.yml:
- Around line 16-19: Update the GitHub Action step that currently reads "uses:
actions/setup-go@v2" to match other workflows by using the newer release tag
(e.g., "actions/[email protected]"); keep the existing "with: go-version:
\"1.26.1\"" input unchanged and ensure the surrounding step (the "uses:
actions/checkout@v6" step) remains intact so the job configuration stays
consistent.

---

Nitpick comments:
In @.github/workflows/lint.yml:
- Line 43: The lint workflow currently pins Go using a caret range ("^1.26.1")
which allows unintended upgrades; change the go-version setting from "^1.26.1"
to the exact string "1.26.1" so it matches other workflows and ensures
deterministic CI (update the value referenced as go-version in the lint
workflow).

In `@test/docker/Dockerfile`:
- Around line 1-42: The Dockerfile currently leaves the container running as
root; create and switch to a non-root user (e.g., add a dedicated user/group and
use USER) and ensure $REPO ownership/permissions are set so that subsequent
runtime operations (tenderdash testnet, VOLUME $REPO, exposed ports) work
without root: during image build (before the final COPY/VOLUME/EXPOSE and before
invoking tenderdash for the test data or at the end of the file) create the
user/group, chown $REPO and any bin dirs (GOBIN) to that user, and add a USER
instruction to run the container as that non-root user while keeping privileged
install steps (make tools, make install, install_abci) executed as root earlier
in the Dockerfile so builds succeed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d981bc6-9e6c-408f-abda-03e81c9a2040

📥 Commits

Reviewing files that changed from the base of the PR and between 297c65c and 0861100.

📒 Files selected for processing (15)
  • .github/actions/bls/action.yml
  • .github/workflows/build.yml
  • .github/workflows/check-generated.yml
  • .github/workflows/e2e.yml
  • .github/workflows/lint.yml
  • .github/workflows/release.yml
  • .github/workflows/tests.yml
  • DOCKER/Dockerfile
  • README.md
  • docs/tutorials/go-built-in.md
  • docs/tutorials/go.md
  • go.mod
  • test/docker/Dockerfile
  • test/e2e/docker/Dockerfile
  • test/fuzz/README.md

Comment on lines 16 to 19
- uses: actions/setup-go@v2
with:
go-version: "1.25.7"
go-version: "1.26.1"
- uses: actions/checkout@v6

Copy link
Copy Markdown
Contributor

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
# Verify all setup-go action versions used in repository workflows/actions
rg -nP 'uses:\s*actions/setup-go@' .github

Repository: dashpay/tenderdash

Length of output: 767


Upgrade actions/setup-go to align with other workflows.

Line 16 uses actions/setup-go@v2 while all other workflows use @v6.3.0. Standardizing on the same major version prevents CI setup drift.

♻️ Proposed update
-    - uses: actions/setup-go@v2
+    - uses: actions/[email protected]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/setup-go@v2
with:
go-version: "1.25.7"
go-version: "1.26.1"
- uses: actions/checkout@v6
- uses: actions/[email protected]
with:
go-version: "1.26.1"
- uses: actions/checkout@v6
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/bls/action.yml around lines 16 - 19, Update the GitHub
Action step that currently reads "uses: actions/setup-go@v2" to match other
workflows by using the newer release tag (e.g., "actions/[email protected]"); keep
the existing "with: go-version: \"1.26.1\"" input unchanged and ensure the
surrounding step (the "uses: actions/checkout@v6" step) remains intact so the
job configuration stays consistent.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Apr 19, 2026
@github-actions github-actions Bot removed the Stale label Apr 26, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label May 27, 2026
Update the pinned Go version from 1.26.1 to the latest 1.26.4 patch
release across workflows, Dockerfiles, go.mod, and docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@lklimek lklimek changed the title build: upgrade Go toolchain from 1.25.7 to 1.26.1 build: upgrade Go toolchain from 1.25.7 to 1.26.4 Jun 11, 2026
lklimek and others added 2 commits June 11, 2026 15:24
… 1.26

golangci-lint v2.8 is built with Go 1.24 and rejects a Go 1.26 target;
v2.12 (go1.26.2 build) clears the guard. Go 1.26's stricter vet also
flags two %q verbs used on non-string args.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
mockery 3.5.4 is built with Go 1.25 and cannot load packages under the
Go 1.26 toolchain; 3.7.0 (go1.26.1 build) restores generation. Regenerate
mocks with the new version.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions github-actions Bot removed the Stale label Jun 12, 2026
@lklimek
lklimek merged commit 05d7f64 into v1.6-dev Jun 12, 2026
30 of 34 checks passed
@lklimek
lklimek deleted the chore/upgrade-go-1.26.1 branch June 12, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant