Skip to content

ci: use Go 1.26 for CodeQL build#4680

Merged
turip merged 1 commit into
mainfrom
feat/fix-codeql-go-toolchain
Jul 9, 2026
Merged

ci: use Go 1.26 for CodeQL build#4680
turip merged 1 commit into
mainfrom
feat/fix-codeql-go-toolchain

Conversation

@turip

@turip turip commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • install Go 1.26.4 in the CodeQL Go workflow so the non-PR full build can compile the collector module
  • include both root and collector go.sum files in setup-go's cache key

Root Cause

The non-PR CodeQL Go workflow installs Go from the root go.mod, which is currently 1.25.6, then runs make build GO_BUILD_FLAGS=. That aggregate build includes build-benthos-collector, but collector/go.mod requires Go 1.26.4 and the job runs with GOTOOLCHAIN=local, so the collector build fails before CodeQL analysis.

Validation

  • git diff --check

Summary by CodeRabbit

  • Chores
    • Updated the Go CodeQL workflow to use a fixed Go version and improved dependency caching for faster, more consistent CI runs.

Greptile Summary

This PR updates the Go CodeQL workflow for the collector build. The main changes are:

  • Pins actions/setup-go to Go 1.26.4.
  • Keeps Go module caching enabled.
  • Adds both root and collector go.sum files to the cache key.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
.github/workflows/codeql-go.yaml Updates the CodeQL Go setup step to use Go 1.26.4 and include both module sum files in setup-go caching.

Reviews (1): Last reviewed commit: "ci: use collector Go version for CodeQL ..." | Re-trigger Greptile

Context used (3)

  • Context used - CLAUDE.md (source)
  • Context used - AGENTS.md (source)
  • Context used - api/spec/AGENTS.md (source)

@turip
turip requested a review from a team as a code owner July 9, 2026 19:19
@coderabbitai

coderabbitai Bot commented Jul 9, 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7051a787-3a1b-4828-a4ae-075a3a5ab025

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce60f3 and 736000d.

📒 Files selected for processing (1)
  • .github/workflows/codeql-go.yaml

📝 Walkthrough

Walkthrough

Hey team! Quick one here — the CodeQL Go workflow's "Set up Go" step now pins a fixed Go version (1.26.4) instead of reading it from go.mod, and it broadens the cache dependency path to cover both go.sum and collector/go.sum.

Changes

CodeQL Go Workflow Update

Layer / File(s) Summary
Set up Go step configuration
.github/workflows/codeql-go.yaml
Switches from go-version-file: go.mod to a fixed go-version: 1.26.4, and adds collector/go.sum to the cache dependency path alongside the root go.sum.

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

Possibly related PRs

  • openmeterio/openmeter#4305: Prior PR that introduced/managed the same CodeQL Go workflow's Go setup and cache dependency configuration.

Suggested labels: release-note/ignore

Suggested reviewers: tothandras

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: updating the CodeQL build to use Go 1.26.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fix-codeql-go-toolchain

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.

@turip
turip enabled auto-merge (squash) July 9, 2026 19:20
@turip turip added the release-note/ignore Ignore this change when generating release notes label Jul 9, 2026
@turip
turip merged commit 74db872 into main Jul 9, 2026
45 of 48 checks passed
@turip
turip deleted the feat/fix-codeql-go-toolchain branch July 9, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants