Skip to content

ci: Upgrade Go versions, clean up#1130

Merged
klauspost merged 6 commits intomasterfrom
go-1-26
Feb 24, 2026
Merged

ci: Upgrade Go versions, clean up#1130
klauspost merged 6 commits intomasterfrom
go-1-26

Conversation

@klauspost
Copy link
Owner

@klauspost klauspost commented Feb 17, 2026

  • Run go fix
  • Upgrade goreleaser
  • Use fixed fuzztime

Summary by CodeRabbit

  • Chores

    • Bumped Go toolchains in CI (now targeting newer Go versions) and updated module Go versions; upgraded GoReleaser to v2.13.3.
    • Updated release packaging to skip certain Windows/ARM builds and modernized build-constraint syntax across the codebase.
  • Refactor

    • Made tests more deterministic and simplified some helpers; removed outdated benchmark code and modernized iteration/utility usage in tests.

* Run go fix
* Upgrade goreleaser
* Use fixed fuzztime
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Bumps Go toolchain and GoReleaser versions in CI and release workflows, updates module Go versions, modernizes or removes legacy build-tag lines (with a few files changing build-logic), and makes small test/code adjustments (FieldsSeq, CutSuffix, slices.Contains, deterministic RNG, and a loop-variable change that may reintroduce closure capture).

Changes

Cohort / File(s) Summary
Workflows & Releases
​.github/workflows/go.yml, ​.github/workflows/release.yml
Bumped CI Go matrix to include 1.26.x and set setup-go steps to 1.26.x; updated GoReleaser CLI references to v2.13.3 and new goreleaser URL.
Module go version bumps
go.mod, huff0/_generate/go.mod, s2/cmd/_s2sx/go.mod, zstd/_generate/go.mod
Updated module go directive from 1.23 → 1.24 across root and submodule go.mod files.
Build constraint modernization (syntax-only)
flate/regmask_other.go, huff0/decompress_amd64.go, huff0/decompress_generic.go, internal/cpuinfo/cpuinfo_amd64.go, s2/decode_other.go, s2/fuzz_test.go, zip/internal/obscuretestdata/obscuretestdata.go, zstd/fse_decoder_amd64.go, zstd/fse_decoder_generic.go, zstd/fuzz_test.go, zstd/internal/xxhash/xxhash_other.go, zstd/matchlen_amd64.go, zstd/seqdec_amd64.go, zstd/seqdec_generic.go, zstd/seqdec_amd64_test.go, zstd/race_enabled_test.go
Removed legacy // +build lines and retained/normalized //go:build directives; no behavioral changes for supported toolchains.
Build-constraint logic changes
s2/encode_go.go, zstd/matchlen_generic.go
Converted old // +build expressions to //go:build with OR-style logic, altering which platforms/environments include these files.
Tests: RNG and benchmarks
gzip/gzip_test.go
Replaced global rand.Seed with a local deterministic RNG (rand.New(rand.NewSource(1337))) and removed an old benchmark block.
Test iteration & potential closure capture
flate/writer_test.go
Removed loop-variable shadowing inside subtest loop (previous l := l), which may reintroduce closure-capture behavior for subtests.
Small API/code updates
flate/example_test.go, gzhttp/asserts_test.go, s2/cmd/s2d/main.go
Replaced strings.Fieldsstrings.FieldsSeq, added slices usage (slices.Contains), updated nil-kind checks (reflect.Pointer), and swapped strings.HasSuffixstrings.CutSuffix with ok-check.
Goreleaser config
.goreleaser.yml
Added ignore rules to exclude Windows/ARM for certain builds and adjusted Windows archive format spec to use formats: ['zip'].
Misc small edits
assorted files reported in summary
Minor imports and metadata edits; primarily build-tag normalization and small test/code tweaks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main objectives: upgrading Go versions and performing cleanup via go fix, though it is somewhat concise.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch go-1-26

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/go.yml (1)

100-103: Replace deprecated git.io redirect with direct GitHub URL.

The git.io/goreleaser shortener is deprecated and in read-only mode since 2022. While it currently redirects to https://raw.githubusercontent.com/goreleaser/get/master/get and works, relying on a deprecated redirect service introduces unnecessary fragility.

Replace both instances with the direct GitHub URL:

https://raw.githubusercontent.com/goreleaser/get/master/get
Lines 100 and 103 examples:
      run: curl -sfL https://raw.githubusercontent.com/goreleaser/get/master/get | VERSION=v2.13.3 sh -s -- check

    - name: goreleaser snapshot
      run: curl -sL https://raw.githubusercontent.com/goreleaser/get/master/get | VERSION=v2.13.3 sh -s -- --snapshot --clean
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/go.yml around lines 100 - 103, Replace the deprecated
git.io shortener usage in the two workflow steps that invoke goreleaser (the
lines running curl for the check and the goreleaser snapshot step) by using the
direct raw GitHub URL (raw.githubusercontent.com/goreleaser/get/master/get)
instead of https://git.io/goreleaser; update both occurrences (the check
invocation and the snapshot --snapshot --clean invocation) to curl the direct
GitHub URL while keeping the existing VERSION=v2.13.3 and sh -s -- arguments
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/go.yml:
- Around line 100-103: Replace the deprecated git.io shortener usage in the two
workflow steps that invoke goreleaser (the lines running curl for the check and
the goreleaser snapshot step) by using the direct raw GitHub URL
(raw.githubusercontent.com/goreleaser/get/master/get) instead of
https://git.io/goreleaser; update both occurrences (the check invocation and the
snapshot --snapshot --clean invocation) to curl the direct GitHub URL while
keeping the existing VERSION=v2.13.3 and sh -s -- arguments unchanged.

@klauspost
Copy link
Owner Author

hmmm.. Seeing golang/go#75804 - maybe revert until there is a fix?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/workflows/go.yml:
- Around line 100-103: Update both curl invocations that fetch goreleaser to use
the official installer URL and consistent curl flags: replace the deprecated
short URL "https://git.io/goreleaser" with "https://goreleaser.com/static/run"
in both runs and make the second run use the same "-sfL" flags as the first (so
both lines use curl -sfL https://goreleaser.com/static/run ...), preserving the
VERSION=v2.13.3 and the existing arguments (-- check and -- --snapshot --clean)
and keeping the "goreleaser snapshot" step name intact.

@klauspost klauspost merged commit cf758fe into master Feb 24, 2026
22 checks passed
@klauspost klauspost deleted the go-1-26 branch February 24, 2026 13:10
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