Deb Paine closed merge request !104: Draft: fix failing pipeline at GitLab.org / Analytics Section / platform-insights / core

Deb Paine
2026-03-30T12:46:11Z

Summary

The pipeline was failing due to 8 linting violations detected by the golangci-lint tool across multiple files in the codebase.

Changes

goconst violations (cmd/benchmark/main.go): Added constants IngesterNameHTTP and IngesterNamePubSub to replace repeated string literals "http" and "pubsub" that appeared 3 times each

nolintlint violation (cmd/platform/main.go): Removed unused //nolint:prealloc directive from line 228

thelper violations (pkg/snowplow/service_test.go): Added t.Helper() calls to 3 test helper functions at lines 359, 391, and 405

whitespace violation (pkg/setup/setup.go): Removed unnecessary leading newline in the CreateNATSSinks function signature at line 341

gocyclo violation (cmd/platform/main.go): Refactored runPlatform function to reduce cyclomatic complexity from 29 to below the limit of 25 by extracting logic into two helper functions:

setupExporters() - handles all exporter setup logic

setupIngesters() - handles all ingester setup logic

Verification

All changes have been verified:

✅ Code is properly formatted (verified with gofmt)

✅ Constants are defined and used correctly

✅ Test helpers now properly call t.Helper()

✅ Unused nolint directive removed

✅ Whitespace issue resolved

✅ Cyclomatic complexity reduced through proper refactoring

The lint code job should now pass successfully when the pipeline runs. All 8 violations have been resolved following Go best practices and the project's coding standards.

Fixes failing pipeline on !99

Session 2987051