Skip to content

fix(ci): bump Go version to 1.25.9#5441

Open
notJoon wants to merge 24 commits intognolang:masterfrom
notJoon:fix/bump-go-and-golangci-lint-version
Open

fix(ci): bump Go version to 1.25.9#5441
notJoon wants to merge 24 commits intognolang:masterfrom
notJoon:fix/bump-go-and-golangci-lint-version

Conversation

@notJoon
Copy link
Copy Markdown
Member

@notJoon notJoon commented Apr 7, 2026

Description

Bump Go from 1.24 to 1.25.9 and golangci-lint from v2.3 to v2.11 across the entire monorepo.

Changes

Go 1.25.9 upgrade

  • Updated go.mod in all 21 modules (root, contribs/*, misc/*, tm2/pkg/libtm, gno.land/pkg/gnoweb/tools)
  • Removed toolchain directives (unnecessary with Go 1.25.9)
  • Updated all CI workflow files (.github/workflows/*.yml) from 1.24.x to 1.25.x
  • Changed Dockerfile base image to golang:1.25-alpine

GnoVM adjustments for Go 1.25

  • Regenerated gnovm/pkg/gnolang/string_methods.go via stringer — Go 1.25 changed the bounds-check pattern from if i >= Kind(len(...)) to idx := int(i) - 0; if i < 0 || idx >= len(...)
  • Updated 10 filetest .gno files where Go 1.25's type checker changed error message wording:
    • "invalid operation: cannot slice ... (value not addressable)""cannot slice unaddressable value ..."
    • "cannot call non-function X (variable of type T)""cannot call X (variable of type T): T is not a function"
    • "cannot make int; type must be""cannot make int: type must be" (semicolon → colon)
  • Added //nolint:staticcheck to gnovm/pkg/doc/json_doc.go for ast.MergePackageFiles, which was deprecated in Go 1.25 with no direct replacement available

golangci-lint v2.11 config changes (.github/golangci.yml)

Disabled prealloc linter

v2.11 significantly increased false positives for the prealloc linter. It now flags cases like []string{} inside loops where preallocation is impractical or the capacity is unknowable at declaration time. Rather than adding //nolint:prealloc across dozens of files, the linter was disabled entirely — the signal-to-noise ratio no longer justifies the maintenance overhead.

Added gosec excludes: G122, G602, G703, G704, G705

golangci-lint v2.11 ships with gosec's new taint-analysis rules enabled by default. These rules track data flow from "sources" (e.g., http.Request, os.Args) through to "sinks" (e.g., os.Open, http.Redirect, template.HTML). In this codebase, they produce a high volume of false positives:

Rule Category Why excluded
G703 Path traversal Taint analysis doesn't recognize validation/sanitization across package boundaries. Flagged instances involve data from trusted internal sources (CLI args, config files).
G704 SSRF Same cross-boundary taint tracking limitation. Flags internal HTTP routing and test fixtures.
G705 XSS Flags template rendering with data that is already sanitized by upstream helpers.
G602 Slice bounds Flags valid slice indexing patterns as potential out-of-bounds access — a known false-positive pattern.
G122 Filesystem race Flags filepath.Walk/WalkDir callbacks with no practical mitigation available.

Added staticcheck exclude: -QF1012

Suppresses quick-fix suggestions to replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf(...). This is a style preference, not a correctness issue. Stale //nolint:staticcheck comments in tm2/pkg/iavl/internal/bytes/bytes.go that were previously suppressing this rule were also removed.

@github-actions github-actions Bot added 🐹 golang Pull requests that update Go code 🚀 ci 🤝 contribs labels Apr 7, 2026
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Apr 7, 2026
@Gno2D2
Copy link
Copy Markdown
Collaborator

Gno2D2 commented Apr 7, 2026

🛠 PR Checks Summary

🔴 Changes related to gnoweb must be reviewed by its codeowners

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
  • Determine if infra needs to be updated before merging
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)
🔴 Changes related to gnoweb must be reviewed by its codeowners
🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: notJoon/gno-core)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Changes related to gnoweb must be reviewed by its codeowners

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 A changed file matches this pattern: ^gno.land/pkg/gnoweb/ (filename: gno.land/pkg/gnoweb/tools/go.mod)

Then

🔴 Requirement not satisfied
└── 🔴 Or
    ├── 🔴 Or
    │   ├── 🔴 And
    │   │   ├── 🔴 Pull request author is user: alexiscolin
    │   │   └── 🔴 This user reviewed pull request: gfanton (with state "APPROVED")
    │   └── 🔴 And
    │       ├── 🔴 Pull request author is user: gfanton
    │       └── 🔴 This user reviewed pull request: alexiscolin (with state "APPROVED")
    └── 🔴 And
        ├── 🟢 Not (🔴 Pull request author is user: alexiscolin)
        ├── 🟢 Not (🔴 Pull request author is user: gfanton)
        └── 🔴 Or
            ├── 🔴 This user reviewed pull request: alexiscolin (with state "APPROVED")
            └── 🔴 This user reviewed pull request: gfanton (with state "APPROVED")

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🟢 User davd-gzl already reviewed PR 5441 with state APPROVED
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🔴 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission
Determine if infra needs to be updated before merging

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Or
        ├── 🟢 A changed file matches this pattern: Dockerfile (filename: Dockerfile)
        ├── 🔴 A changed file matches this pattern: ^misc/deployments
        ├── 🔴 A changed file matches this pattern: ^misc/docker-
        └── 🔴 A changed file matches this pattern: ^.github/workflows/release.*\.yml$

Can be checked by

  • team devops

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 38.46154% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
gnovm/pkg/gnolang/string_methods.go 33.33% 6 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@notJoon notJoon changed the title fix(ci): bump golangci-lint to v2.11 and Go to 1.25.0 fix(ci): bump Go version to 1.25.0 Apr 7, 2026
@github-actions github-actions Bot added 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 🌍 gnoweb Issues & PRs related to gnoweb and render 🐳 devops 🛠️ gnodev labels Apr 7, 2026
@Gno2D2 Gno2D2 requested review from alexiscolin and gfanton April 7, 2026 07:44
@notJoon notJoon marked this pull request as draft April 7, 2026 07:54
@Gno2D2 Gno2D2 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Apr 7, 2026
@github-actions github-actions Bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Apr 7, 2026
@notJoon notJoon marked this pull request as ready for review April 7, 2026 09:31
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Apr 7, 2026
@notJoon notJoon requested a review from jefft0 April 7, 2026 09:32
Copy link
Copy Markdown
Member

@davd-gzl davd-gzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, there's no missing go.mod to update. I didn't re verify versions of packages, but tests are passing and new excluded rules seems valid to me.

To note, GnoLSP (from another repository) is in 1.23, it is broken in 1.25.

@Gno2D2 Gno2D2 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Apr 7, 2026
@nemanjantic nemanjantic requested a review from thehowl April 8, 2026 07:59
@nemanjantic nemanjantic moved this from Triage to In Review in 🧙‍♂️Gno.land development Apr 8, 2026
@nemanjantic nemanjantic added the a/vm GnoVM, Security, Runtime team label Apr 8, 2026
moul and others added 3 commits April 9, 2026 14:33
Consolidates **37 → 29** workflow files by eliminating unnecessary
abstraction layers, duplication, and establishing clear naming
conventions with consistent prefixes.

Prompted by @thehowl's
[comment](gnolang#5420 (comment)):
"There seems to be half a dozen release workflows already 😵"

Every workflow file is prefixed by category:

| Prefix | Purpose | Examples |
|--------|---------|---------|
| `_ci-` | Reusable workflow templates | `_ci-go.yml`, `_ci-gno.yml` |
| `ci-dir-` | Per-directory test suites | `ci-dir-gnovm.yml`,
`ci-dir-tm2.yml`, `ci-dir-examples.yml` |
| `ci-` | Other CI checks | `ci-e2e.yml`, `ci-codegen-verify.yml`,
`ci-bench-gnovm.yml` |
| `deploy-` | Deployment workflows | `deploy-pages.yml`,
`deploy-docs.yml` |
| `meta-` | Repo automation, security scanning | `meta-bot.yml`,
`meta-codeql.yml`, `meta-fossa.yml` |
| `meta-gh-` | GitHub-native PR tools | `meta-gh-title.yml`,
`meta-gh-labeler.yml`, `meta-gh-stale.yml` |
| `release-` | Release/publish workflows | `release-goreleaser.yml`,
`release-docker.yml`, `release-staging.yml` |

Workflow `name:` fields use spaced paths (`ci / gnovm`, `meta / bot`,
`release / docker`) so GitHub checks display as clean breadcrumbs with
no duplication.

**Template flattening (9 files → 2)**
- `template_main.yml` → `template_lint.yml` → `template_build.yml` →
`template_test.yml` (4-level chain) replaced by single **`_ci-go.yml`**
- `template_gnofmt.yml` + `template_gnolint.yml` +
`template_gnotest.yml` replaced by single **`_ci-gno.yml`** with toggle
inputs

**Release consolidation (3 files → 2)**
- `releaser-master.yml` + `releaser-nightly.yml` (90% identical) merged
into **`release-goreleaser.yml`** with conditional args
- `chain_docker_build.yml` → **`release-docker.yml`**

**Verification consolidation (3 files → 1)**
- `mod-tidy.yml` + `genproto.yml` + `docs-generate.yml` merged into
**`ci-codegen-verify.yml`**

**Bug fix: examples.yml**
- Old workflow called `_ci-go.yml` (lint+build+test) but `examples/` has
no `go.mod`
- Now inlines the generate check directly

**Simplifications**
- Removed single-value matrices (added complexity for no reason)
- Removed `strategy: fail-fast: false` from jobs without matrices
- Switched from hardcoded `"1.24.x"` to `go-version-file: go.mod` where
possible
- Cleaned up `meta-codeql.yml` boilerplate (94 → 30 lines)
- Fixed checkout ordering (checkout before setup-go when using
`go-version-file`)

| Before | After |
|--------|-------|
| `template_main.yml` | _deleted, flattened into `_ci-go.yml`_ |
| `template_lint.yml` | _deleted_ |
| `template_build.yml` | _deleted_ |
| `template_test.yml` | _deleted_ |
| `template_gnofmt.yml` | _deleted, flattened into `_ci-gno.yml`_ |
| `template_gnolint.yml` | _deleted_ |
| `template_gnotest.yml` | _deleted_ |
| `releaser-master.yml` | _deleted, merged into
`release-goreleaser.yml`_ |
| `releaser-nightly.yml` | _deleted_ |
| `mod-tidy.yml` | _deleted, merged into `ci-codegen-verify.yml`_ |
| `genproto.yml` | _deleted, merged into `ci-codegen-verify.yml`_ |
| `docs-generate.yml` | _deleted, merged into `ci-codegen-verify.yml`_ |
| `gnovm.yml` | `ci-dir-gnovm.yml` |
| `tm2.yml` | `ci-dir-tm2.yml` |
| `gnoland.yml` | `ci-dir-gnoland.yml` |
| `misc.yml` | `ci-dir-misc.yml` |
| `contribs.yml` | `ci-dir-contribs.yml` |
| `examples.yml` | `ci-dir-examples.yml` |
| `e2e.yml` | `ci-e2e.yml` |
| `genesis-verify.yml` | `ci-genesis-verify.yml` |
| `gnovm-benchops.yml` | `ci-bench-gnovm.yml` |
| `benchmark-master-push.yml` | `release-bench-history.yml` |
| `chain_docker_build.yml` | `release-docker.yml` |
| `staging.yml` | `release-staging.yml` |
| `docs-deploy.yml` | `deploy-docs.yml` |
| `gh-pages.yml` | `deploy-pages.yml` |
| `bot.yml` | `meta-bot.yml` |
| `bot-proxy.yml` | `meta-bot-proxy.yml` |
| `codeql.yml` | `meta-codeql.yml` |
| `fossa.yml` | `meta-fossa.yml` |
| `dependabot-tidy.yml` | `meta-dependabot-tidy.yml` |
| `dependabot-validate.yml` | `meta-dependabot-validate.yml` |
| `examples-bot.yml` | `meta-discord-bot.yml` |
| `auto-author-assign.yml` | `meta-gh-assign.yml` |
| `labeler.yml` | `meta-gh-labeler.yml` |
| `stale-bot.yml` | `meta-gh-stale.yml` |
| `lint-pr-title.yml` | `meta-gh-title.yml` |

**Internal reference updates**
- `meta-bot-proxy.yml`: updated `workflows:` and `gh workflow run` to
match new names
- `release-staging.yml`: updated self-reference in path trigger
- `ci-genesis-verify.yml`: updated self-reference in path trigger
- `github-bot` config: `releaser.*\.yml` → `release.*\.yml`,
`staging\.yml` → `release-staging.yml`

| | Before | After |
|--|--------|-------|
| Workflow files | 37 | 29 |
| Reusable templates | 7 files, 4-level nesting | 2 files, max 1 level |
| Release workflows | 2 near-identical + confusingly named | 1 unified +
1 docker + staging |
| Verification workflows | 3 separate files | 1 merged file |
| Naming convention | none | 7 consistent prefixes |
| Check name format | `contribs / ci/go/contribs (bot) / build` | `ci /
contribs / github-bot / build` |

```
_ci-gno.yml               # reusable: gno fmt + lint + test
_ci-go.yml                 # reusable: go lint + build + test
ci-bench-gnovm.yml         # GnoVM micro benchmarks (artifacts)
ci-codegen-verify.yml      # merged: mod-tidy + genproto + docs-generate
ci-dir-contribs.yml
ci-dir-examples.yml
ci-dir-gnoland.yml
ci-dir-gnovm.yml
ci-dir-misc.yml
ci-dir-tm2.yml
ci-e2e.yml
ci-genesis-verify.yml
deploy-docs.yml
deploy-pages.yml
meta-bot-proxy.yml
meta-bot.yml
meta-codeql.yml
meta-dependabot-tidy.yml
meta-dependabot-validate.yml
meta-discord-bot.yml
meta-fossa.yml
meta-gh-assign.yml
meta-gh-labeler.yml
meta-gh-stale.yml
meta-gh-title.yml
release-bench-history.yml  # publishes to gh-benchmarks branch
release-docker.yml
release-goreleaser.yml     # merged: master + nightly releases
release-staging.yml
```

---------

Co-authored-by: Jerónimo Albi <894299+jeronimoalbi@users.noreply.github.com>
## Summary

- Reverts FOSSA to `workflow_dispatch` only, matching the original
intent from Nov 2024 (accidentally undone by gnolang#3316)
- Removes `fossa test` step which fails with push-only API key

The `push` and `pull_request_target` triggers were accidentally
re-introduced in Dec 2024. FOSSA scanning is intended to run on-demand
only ("when legal requests it"). The `fossa test` step has been failing
because the `FOSSA_API_KEY` is push-only and cannot read compliance
results.

Follow-up to gnolang#5423.

## Test plan

- [x] Verify `meta-fossa.yml` no longer triggers on push/PR
- [x] Manually trigger workflow_dispatch to confirm `fossa analyze`
still works
@jefft0
Copy link
Copy Markdown
Contributor

jefft0 commented Apr 13, 2026

Hello @notJoon . The CI check for gnoland/main fails with "panic: txDispatcher subscription unexpectedly closed". I ran this PR branch with make test locally and it passes. Do you think that the CI check failure is related to this PR?

@jefft0
Copy link
Copy Markdown
Contributor

jefft0 commented Apr 14, 2026

This dependabot PR tries to use go1.25, and one of the workflow tools requires go >= 1.25.5.

golang.org/x/pkgsite@v0.0.0-20260410212959-70e508737129 requires go >= 1.25.5 (running go 1.24.4; GOTOOLCHAIN=local)

In general, shouldn't we use the latest version with recent security fixes? This is go 1.25.9 .
https://go.dev/doc/devel/release#go1.25.minor

Copy link
Copy Markdown
Contributor

@jefft0 jefft0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds on my local macOS. CI checks pass.

@notJoon notJoon changed the title fix(ci): bump Go version to 1.25.0 fix(ci): bump Go version to 1.25.9 Apr 24, 2026
…olangci-lint-version

# Conflicts:
#	tm2/pkg/libtm/go.mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a/vm GnoVM, Security, Runtime team 🚀 ci 🤝 contribs 🐳 devops 🛠️ gnodev 🌍 gnoweb Issues & PRs related to gnoweb and render 🐹 golang Pull requests that update Go code 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 📄 top-level-md

Projects

Status: No status
Status: In Review
Status: In Review

Development

Successfully merging this pull request may close these issues.

7 participants