Skip to content

chore: pin mockery and golangci-lint to Go 1.27-compatible versions - #3470

Merged
tac0turtle merged 1 commit into
mainfrom
chore/pin-tools-go127
Oct 12, 2026
Merged

tac0turtle merged 1 commit into
mainfrom
chore/pin-tools-go127

Conversation

@tac0turtle

@tac0turtle tac0turtle commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Overview

CI already builds with Go 1.27.0. Locally, older tool builds break under 1.27:

  • mockery v3.4.0: internal error: package "context" without types was imported from ...
  • golangci-lint v2.10.1 (built with go1.26): file requires newer Go version go1.27

Changes

  • just mock-gen: pin mockery @latest → @v3.8.1, which works under Go 1.27.
  • CI lint: pin golangci-lint latest → v2.14.0 (built with go1.27). With latest, lint results could change on a PR just because a new release came out.
  • pkg/config/yaml.go: remove the redundant field := field that copyloopvar flags in v2.14.0. It was introduced by the recent go fix ./... commit, and with latest it would have failed the next PR that touched Go files.

Known issue (not addressed here)

just mock-gen doesn't reproduce the committed mocks, with any mockery version. Several generated mocks were edited by hand:

  • test/mocks/execution.go: ExecuteTxs accepts a []byte return as backward compat, and GetExecutionInfo has a default.
  • test/mocks/da.go: SupportsSubscribe is not on the Client interface.

Regenerating the mocks today breaks compilation in block/internal/executing tests. Fixing that means moving those behaviours into test helpers and then regenerating. That's a separate PR.

Testing

  • golangci-lint v2.14.0 run ./...: 0 issues.
  • go test ./pkg/config/... passes.

Summary by CodeRabbit

  • Chores
    • Pinned versions of development tools to provide more consistent linting and mock generation.
  • Refactor
    • Simplified YAML field processing; its behavior remains unchanged.

- Pin mockery to v3.8.1 in `just mock-gen` (was @latest). Older v3.4.0
  fails to load packages under Go 1.27 ("package context without types").
- Pin golangci-lint to v2.14.0 in CI (was latest), so lint results don't
  change underneath PRs when a new release ships.
- Remove a redundant loop variable copy in pkg/config/yaml.go flagged by
  copyloopvar in golangci-lint v2.14.0.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 760a2ee8-ca17-44b0-89df-7e83e3a43731

📥 Commits

Reviewing files that changed from the base of the PR and between 7da47da and 854071d.


📒 Files selected for processing (3)
  • .github/workflows/lint.yml
  • .just/codegen.just
  • pkg/config/yaml.go

💤 Files with no reviewable changes (1)
  • pkg/config/yaml.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The lint workflow pins golangci-lint to v2.14.0, and the mock-gen recipe pins mockery to v3.8.1. SaveAsYaml no longer copies the field range variable inside its processing loop.

Changes

Tool Version Pins

Layer / File(s) Summary
Pin lint and mock-generation versions
.github/workflows/lint.yml, .just/codegen.just
The lint workflow uses golangci-lint v2.14.0. The mock-gen recipe uses mockery v3.8.1.

YAML Field Processing

Layer / File(s) Summary
Use the field loop variable
pkg/config/yaml.go
The field-processing loop no longer creates a local copy of field.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other


Merge Risk: ⚪ Minimal · up to 85407

The lint and YAML changes show no concrete regression. Mock generation with the pinned version remains unverified, but no failure is established.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: pinning mockery and golangci-lint to versions compatible with Go 1.27. It is concise and follows the repository's semantic commit format.
Description check Passed The description includes the required Overview section and provides clear context, rationale, changes, testing results, and an explicit out-of-scope known issue.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@tac0turtle
tac0turtle merged commit ef08d9f into main Oct 12, 2026
21 of 25 checks passed
@tac0turtle
tac0turtle deleted the chore/pin-tools-go127 branch October 12, 2026 15:23
@github-actions

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed⏩ skippedOct 12, 2026, 3:25 PM

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.53%. Comparing base (508464b) to head (854071d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   69.54%   69.53%   -0.02%     
==========================================
  Files         121      121              
  Lines       12006    12002       -4     
==========================================
- Hits         8350     8345       -5     
- Misses       3656     3657       +1     
Flag Coverage Δ
combined 69.53% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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