chore: improve devcontainer and align golangci-lint versions#2097
Open
chore: improve devcontainer and align golangci-lint versions#2097
Conversation
104dc35 to
d106017
Compare
Retina Code Coverage ReportTotal coverage increased from
|
| Impacted Files | Coverage | |
|---|---|---|
| pkg/enricher/enricher.go | 55.0% ... 57.8% (2.8%) |
⬆️ |
69b002c to
00e6787
Compare
- Add jq, LLVM 17, and VS Code linter/formatter settings to devcontainer - Remove redundant gofumpt install (already a go tool dependency) - Add CI workflow to validate the devcontainer builds and compiles eBPF - Replace golangci-lint-action (version: latest) with go tool so CI uses the same pinned version from go.mod as local make lint - Build linter binary for host (linux/amd64) before running cross-platform analysis to avoid exec format errors on Windows/ARM64 matrix jobs - Expand development docs with devcontainer quick-start instructions Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
00e6787 to
065bf0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently the devcontainer is missing several tools needed for development (LLVM/clang, jq), uses a shell script for setup instead of devcontainer features, and has no CI validation. Separately, the golangci-lint workflow uses
version: latestwhich drifts from the version pinned ingo.mod, causing lint results that don't reproduce locally (#2027).This PR overhauls the devcontainer and aligns CI lint tooling:
installMoreTools.shwith declarative devcontainer features (LLVM 17, pinned versions), add persistent Go module/build caches, jq, Kind cluster on startup, and VS Code settings for golangci-lint + gofumptdevcontainer.yamlworkflow that builds the container and runsmake generate-bpf-goto validate eBPF compilation for both amd64 and arm64golangci-lint-action(version: latest) withgo toolso CI uses the same v1.64.7 fromgo.modas localmake lintRelated Issue
Fixes #2027
Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
CI will validate:
devcontainer.yamlworkflowmake generate-bpf-goinside the containergolangci-lint.yamlworkflow usinggo toolAdditional Notes
The devcontainer CI workflow only triggers on changes to
.devcontainer/**to avoid unnecessary runs.