Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.PHONY: test test-extras test-extras-sustained test-extras-fuzz test-extras-fuzz-kmsg test-extras-fuzz-journald test-extras-fuzz-nccl-fr test-extras-race bench bench-check bench-allocs-check bench-baseline bench-detectors bench-detectors-check bench-detectors-baseline bench-cv-report helm-install-rolling-report

# Format + tidy
.PHONY: fmt fmt-fix vet lint lint-fix tidy tidy-check mod-verify bump-otel
.PHONY: fmt fmt-fix vet lint lint-fix lint-unused-module tidy tidy-check mod-verify bump-otel

# Code generation
.PHONY: generate-fixtures generate-fixtures-check verdict-fixtures-check
Expand Down Expand Up @@ -140,6 +140,23 @@ lint: ## Run golangci-lint.
lint-fix: ## Run golangci-lint with --fix.
go tool golangci-lint run --fix ./...

lint-unused-module: ## Run the `unused` lint check against module/ (the in-repo Go submodule).
@# Workspace mode resolves `./...` only inside the current module, so
@# `make lint` from root NEVER reaches module/ — the in-repo submodule
@# is a separate Go module under go.work. The `unused` linter is
@# enabled in .golangci.yml but was silently skipped against module/
@# until this gate landed (chore/dead-code-sweep-2026-06 found 3
@# unused functions accumulated this way). Scoped to `unused` only
@# because the broader lint pass has pre-existing module/ findings
@# (errorlint, exhaustive, forcetypeassert, etc.) that need their
@# own dedicated cleanup PRs — bundling them here would balloon
@# scope. Promote to full `make lint` coverage once those land.
@# `--no-config` is required: the repo `.golangci.yml` v2 schema
@# enables a broad linter set; without `--no-config` that set wins
@# over the `--enable=unused` filter and we'd lint everything in
@# module/ (199+ pre-existing findings) instead of just unused.
cd module && go tool golangci-lint run --no-config --default=none --enable=unused ./...

tidy: ## Tidy go.mod / go.sum.
go mod tidy

Expand Down Expand Up @@ -264,7 +281,7 @@ coverage: ## Run all tests under the race detector with coverage profiling; emi
coverage-check: coverage ## Fail if any internal/* package <70% or components/* package <60%.
@go run ./tools/coverage-check -profile=coverage.out

check: fmt tidy-check lint vet mod-verify attribute-namespace-check ## Pre-commit gate. Fast (<10s); no test, no build. Catches typos, format, deps drift.
check: fmt tidy-check lint lint-unused-module vet mod-verify attribute-namespace-check ## Pre-commit gate. Fast (<10s); no test, no build. Catches typos, format, deps drift.

attribute-namespace-check: ## Binding drift gate for the customer-stable attribute namespace declared in docs/ATTRIBUTES.md (v1.0-rc1 cut criterion 3). Fails on any attribute literal in code that is missing from ATTRIBUTES.md.
@bash scripts/attribute-namespace-check.sh
Expand Down
29 changes: 0 additions & 29 deletions module/pkg/patterns/pod_evicted.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,25 +375,6 @@ func nodeConditionDescription(cond NodeRecord, scratch *[]byte) string {
return string(buf)
}

// displayPodName returns "namespace/name" for a Pod-shaped Record;
// falls back to just the name (or "<unknown>") otherwise. Retained
// as a package-level helper (external callers, e.g. xid_correlation,
// may use it); pod_evicted's hot path inlines this logic into
// renderHeadline.
func displayPodName(ev Record) string {
if ev.Regarding.Namespace != "" && ev.Regarding.Name != "" {
buf := make([]byte, 0, len(ev.Regarding.Namespace)+len(ev.Regarding.Name)+1)
buf = append(buf, ev.Regarding.Namespace...)
buf = append(buf, '/')
buf = append(buf, ev.Regarding.Name...)
return string(buf)
}
if ev.Regarding.Name != "" {
return ev.Regarding.Name
}
return "<unknown>"
}

// appendTimestamp appends an EventTime in RFC3339 UTC to buf in
// place. Zero time renders as "<unknown>" so the headline regex
// still matches the /at .*/ shape.
Expand All @@ -408,16 +389,6 @@ func appendTimestamp(buf []byte, t time.Time) []byte {
return t.UTC().AppendFormat(buf, time.RFC3339)
}

// formatTimestamp renders an EventTime in RFC3339 UTC. Retained for
// external callers (test helpers); hot-path callers in this file use
// appendTimestamp directly to share a buffer.
func formatTimestamp(t time.Time) string {
if t.IsZero() {
return "<unknown>"
}
return t.UTC().Format(time.RFC3339)
}

// pressureFromNote heuristically extracts a pressure kind from the
// kubelet Note body when the structured NodeRecord join fails. The
// pressureMatchers table tracks upstream pkg/kubelet/eviction/helpers.go
Expand Down
9 changes: 0 additions & 9 deletions module/receiver/ncclfrreceiver/nccl_fr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,6 @@ func (s *logsSink) recordCount() int {
return total
}

func (s *logsSink) first() plog.Logs {
s.mu.Lock()
defer s.mu.Unlock()
if len(s.pushed) == 0 {
return plog.NewLogs()
}
return s.pushed[0]
}

// fakeSelfTelemetry records every selfTelemetry call so tests can
// assert IncEmissions is invoked with the correct record count on the
// success path and NOT invoked on the error path. Implements the
Expand Down
1 change: 0 additions & 1 deletion scripts/validator-recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ set -euo pipefail
BIN="${BIN:-./_build/tracecore}"
CACHE_DIR="${CACHE_DIR:-/tmp/otelcol-contrib-cache}"
INTEGRATIONS_DIR="docs/integrations"
EXAMPLES_DIR="$INTEGRATIONS_DIR/examples"
MODULE_DIR="${MODULE_DIR:-module}"

if [[ ! -x "$BIN" ]]; then
Expand Down