Repository navigation
ci: run Go build and lint outside Nix - #5072
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe CI workflow now pins Go and golangci-lint versions, runs builds with direct Go setup, and separates Go linting from other checks. The Nix shell writes the pinned version files used by GitHub Actions. ChangesCI toolchain and workflow
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to CI now separates direct Go build and lint execution from other Nix-based checks while retaining pinned tool versions. The reported validation passes indicate the workflow is ready to merge. Suggested reviewers: Sequence Diagram(s)Build execution flowsequenceDiagram
participant GitHubActions
participant GoToolchain
participant DepotGoCache
participant Make
GitHubActions->>GoToolchain: Set up version from .go-version
GitHubActions->>DepotGoCache: Verify GOCACHEPROG
GitHubActions->>Make: Run make -j 4 build GO_BUILD_FLAGS=
Go lint execution flowsequenceDiagram
participant GitHubActions
participant GoToolchain
participant GolangCILint
participant Make
GitHubActions->>GoToolchain: Set up version from .go-version
GitHubActions->>GolangCILint: Install version from .golangci.version
GitHubActions->>Make: Run make lint-go
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
75cafa1 to
1da022a
Compare
Summary
.go-versionand.golangci.versionlint-gopass onceBenchmark
Final configuration, two CI samples on the same commit:
make lint-goCompared with the earlier three-sample medians:
The final Go command timings match the upstream benchmark within run variance. Removing Nix setup and serial non-Go checks reduced the complete Build job by about 35% and the Go lint job by about 47% versus the earlier unsplit upstream variant.
This PR changes
flake.nix, so each PR attempt intentionally rebuilt and published an immutable Nix cache beforeLint / Other. Build and Go lint do not depend on that gate and completed several minutes earlier. Once the new flake is on main, unchanged PRs can select the shared main Nix cache.The Go build uses confluent-kafka-go's embedded librdkafka. Depot's runner-provided Go cache remains enabled and is verified without overriding executor cache paths.
No Jira ticket; this is CI optimization work following the benchmark.
Validation
Greptile Summary
The PR moves Go compilation and linting out of the Nix environment while retaining Nix-dependent validation in a separate job.
Confidence Score: 5/5
The PR appears safe to merge because no blocking failure remains.
No blocking failure remains.
Important Files Changed
Reviews (3): Last reviewed commit: "ci: run only the complete go lint pass" | Re-trigger Greptile
Summary by CodeRabbit
Chores
Refactor