Skip to content

Fix CI lint failures: upgrade golangci-lint and Go version in CI#51

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-new-feature
Draft

Fix CI lint failures: upgrade golangci-lint and Go version in CI#51
Copilot wants to merge 5 commits intomainfrom
copilot/add-new-feature

Conversation

Copy link

Copilot AI commented Feb 28, 2026

golangci-lint v1.54 cannot typecheck code targeting Go 1.24 (set in go.mod by the cortex v1.20.1 upgrade), causing false undefined errors for vendored packages like kingpin, ulid, and yaml.

CI configuration

  • Upgrade golangci-lint v1.54 → v1.64, golangci-lint-action v4 → v6
  • Upgrade Go version in all CI jobs from 1.22 → 1.24 to match go.mod

Linter config (.golangci.yml)

  • Fix deprecated options: output.formatoutput.formats, remove errcheck.exclude
  • Add disable-all: true so only explicitly listed linters run (matches prior behavior)

Code fixes for revive: redefines-builtin-id

  • Rename min/maxminFloat64/maxFloat64 in cmd/sim/main.go (shadow Go 1.21+ builtins)
  • Rename newupdated parameter in CompareNamespaces (pkg/rules/compare.go)

Cleanup

  • Remove accidentally committed blockgen binary from prior session

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /tmp/go-build3639953578/b1432/httpmiddleware.test /tmp/go-build3639953578/b1432/httpmiddleware.test -test.testlogfile=/tmp/go-build3639953578/b1432/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build3639953578/b1394/vet.cfg AJ7RQGEA_ .cfg ux_amd64/vet g_.a om/uudashr/iface-test.testlogfile=/tmp/go-build3639953578/b1114/testlog.txt ache/go/1.24.13/-test.paniconexit0 ux_amd64/vet port�� k/cortex-tools/cortex-tools/vend-errorsas estmain.go ux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux_amd64/vet (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add new feature to enhance user experience No changes: issue lacks actionable requirements Feb 28, 2026
Copilot AI and others added 2 commits February 28, 2026 18:33
Replace rulefmt.RuleNode with rulefmt.Rule, convert yaml.Node{Value: x}
to plain string values, update field access from .Expr.Value to .Expr
(and similar for .Record and .Alert), and remove unused yaml imports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update go.mod to reference cortex v1.20.1 and go 1.24.0
- Add changelog entries and files for v0.18.1, v0.19.1, v0.20.1
- Fix API changes: rulefmt.RuleNode -> rulefmt.Rule (string fields)
- Fix tsdb.NewBlockWriter to use *slog.Logger
- Fix dns.Provider.Resolve to include flushOld parameter
- Fix bucket.NewClient signature change
- Fix objstore.Bucket.Upload signature change
- Fix remote.ReadClient.Read API change (returns SeriesSet)
- Fix labels.Labels type changes (no longer a slice)
- Update ulid to v2 in blockscopy
- Update replace directives to match cortex v1.20.1
- Update vendor directory
- Update test files for new Rule type API

Co-authored-by: CharlieTLe <3375195+CharlieTLe@users.noreply.github.com>
Copilot AI changed the title No changes: issue lacks actionable requirements Upgrade cortex dependency from v1.18.1 to v1.20.1 Feb 28, 2026
Copilot AI and others added 2 commits March 1, 2026 02:58
Co-authored-by: CharlieTLe <3375195+CharlieTLe@users.noreply.github.com>
- Update validate_pr.yml to use Go 1.24 matching go.mod requirement
- Upgrade golangci-lint from v1.54 to v1.64 (supports Go 1.24)
- Upgrade golangci-lint-action from v4 to v6
- Update .golangci.yml: use disable-all with explicit linter list,
  fix deprecated config options (output.format -> output.formats,
  errcheck.exclude -> removed)
- Rename min/max functions in cmd/sim/main.go to avoid shadowing
  Go 1.21+ builtins (revive: redefines-builtin-id)
- Rename 'new' parameter in CompareNamespaces to 'updated' to avoid
  shadowing builtin (revive: redefines-builtin-id)
- Remove accidentally committed blockgen binary

Co-authored-by: CharlieTLe <3375195+CharlieTLe@users.noreply.github.com>
Copilot AI changed the title Upgrade cortex dependency from v1.18.1 to v1.20.1 Fix CI lint failures: upgrade golangci-lint and Go version in CI Mar 1, 2026
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.

2 participants