Skip to content

Commit 730495a

Browse files
jadhajclaude
andcommitted
Remove golangci-lint from tools.go to fix CI OOMKilled
The CI lint step was hitting OOMKilled (exit code 137) because golangci-lint loads the entire module dependency graph into memory, including all OTE dependencies from the synced vendor directory. Removed golangci-lint from tools.go to exclude its massive dependency tree (~3k vendor files) from go.mod/vendor. The Makefile continues using: GOFLAGS=-mod=mod go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint This downloads golangci-lint on-demand without making it a formal module dependency, significantly reducing memory pressure in CI. Also updated .golangci.yaml to skip vendor and test directories from linting (defense in depth). Changes: - Removed golangci-lint import from tools.go - Updated .golangci.yaml with skip-dirs configuration - Deleted 2,977 golangci-lint vendor files Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c740671 commit 730495a

2,982 files changed

Lines changed: 5 additions & 495586 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.golangci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ version: "2"
22
run:
33
skip-dirs:
44
- vendor
5+
- test/e2e
6+
- cmd/cluster-baremetal-tests-ext
57
linters:
68
default: none
79
enable:

go.mod

Lines changed: 0 additions & 162 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 0 additions & 431 deletions
Large diffs are not rendered by default.

tools.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
package tools
88

99
import (
10-
_ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
1110
// Need these for code generation
1211
_ "github.com/go-bindata/go-bindata/go-bindata"
1312
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
14-
// Note: kustomize/kustomize/v4 removed from tools.go to avoid version conflicts with OTE dependencies.
15-
// The Makefile still uses it via 'go run sigs.k8s.io/kustomize/kustomize/v4' which downloads it on-demand.
13+
// Note: kustomize/kustomize/v4 and golangci-lint removed from tools.go to avoid
14+
// massive dependency graphs that cause OOM in CI.
15+
// The Makefile uses 'go run' which downloads them on-demand without polluting go.mod.
1616

1717
// Need this for unit tests job in CI
1818
_ "sigs.k8s.io/controller-runtime/tools/setup-envtest"

vendor/4d63.com/gocheckcompilerdirectives/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

vendor/4d63.com/gocheckcompilerdirectives/checkcompilerdirectives/checkcompilerdirectives.go

Lines changed: 0 additions & 106 deletions
This file was deleted.

vendor/4d63.com/gochecknoglobals/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

vendor/4d63.com/gochecknoglobals/checknoglobals/check_no_globals.go

Lines changed: 0 additions & 186 deletions
This file was deleted.

0 commit comments

Comments
 (0)