Skip to content

ci: split go-tests into our-pkgs matrix and all-pkgs job#257

Open
vporoshok wants to merge 2 commits into
ppfrom
ci-run-all-go-tests
Open

ci: split go-tests into our-pkgs matrix and all-pkgs job#257
vporoshok wants to merge 2 commits into
ppfrom
ci-run-all-go-tests

Conversation

@vporoshok
Copy link
Copy Markdown
Collaborator

@vporoshok vporoshok commented Mar 12, 2026

Summary

Reorganize Go-test CI so that our packages are exercised under multiple
build profiles, and the entire repository is exercised under a single
profile.

Matrix layout

go-tests (our packages: ./pp/go/... ./pp-pkg/...) — full matrix with
two skipped combinations (asan+dbg, jemalloc+opt):

arch OPT sanitizers
amd64 dbg jemalloc
amd64 opt asan
arm64 dbg jemalloc
arm64 opt asan

go-tests-all-pkgs (whole repo, root module ./...) — only the leftover
combination, on both architectures:

arch OPT sanitizers
amd64 opt jemalloc
arm64 opt jemalloc

build_dev waits for both jobs.

Supporting changes

  • Makefile: default pkgs := ./pp/go/... ./pp-pkg/... so make test
    targets our packages out of the box; CI overrides pkgs for the
    all-pkgs run.
  • Makefile.common: pass extra go test flags via args (defaulting to
    test-flags) so CI can append -cover/-coverprofile/etc. without
    losing -race or -asan from pp/scripts/ci_get_go_test_flags.sh.
  • scripts/list-test-packages.sh (new): enumerate all packages
    excluding ones we replace with pp-pkg counterparts, ones not
    shipped with cmd/prometheus, and bundled web/ui node_modules
    Go files.
  • util/testutil/testing.go: ignore TSDB DB.run and wlog.WL.run
    goroutines in TolerantVerifyLeak (tests using teststorage may
    finish before these background loops fully shut down).
  • documentation/examples/remote_storage/go.mod,
    pp/tools/block_converter/go.mod: bump go directive to 1.25.0 so
    check-go-mod-version passes.

Made with Cursor

- Trim go-tests matrix to four meaningful variants by also excluding
  no_sanitizers+opt; matrix now covers our packages
  (./pp/go/... ./pp-pkg/...) under {dbg+jemalloc, opt+asan} on
  amd64 and arm64.
- Add go-tests-all-pkgs job that exercises the entire repository
  (root module ./..., minus packages replaced by pp-pkg or unused by
  cmd/prometheus) under opt+jemalloc on amd64 and arm64.
- Wire build_dev to wait for both jobs.

Supporting changes:
- Makefile: default pkgs = ./pp/go/... ./pp-pkg/... so make test
  targets our packages out of the box; CI overrides pkgs for the
  all-pkgs run.
- Makefile.common: pass extra go test flags via args (defaulting to
  test-flags) so CI can append -cover/-coverprofile/etc. without
  losing -race or -asan from ci_get_go_test_flags.sh.
- scripts/list-test-packages.sh: enumerate all packages excluding
  ones we replace with pp-pkg counterparts, ones not shipped with
  cmd/prometheus, and bundled web/ui node_modules Go files.
- util/testutil: ignore tsdb DB.run and wlog WL.run goroutines in
  TolerantVerifyLeak; tests using teststorage may finish before
  these background loops fully shut down.
- documentation/examples/remote_storage, pp/tools/block_converter:
  bump go directive to 1.25.0 so check-go-mod-version passes.

Made-with: Cursor
@vporoshok vporoshok force-pushed the ci-run-all-go-tests branch from d953a51 to 7d3a765 Compare May 12, 2026 11:53
@vporoshok vporoshok changed the title ci: run all Go tests, make args for flags, fix goleak and go.mod versions ci: split go-tests into our-pkgs matrix and all-pkgs job May 12, 2026
- tracing: bump otel semconv import v1.39.0 -> v1.40.0 to match the
  resource SDK; v1.39.0 collides with the new SDK schema URL
  (conflicting Schema URL: 1.39.0 and 1.40.0).
- tsdb: skip the heaviest upstream e2e/race tests (TestDB_e2e,
  TestWALReplayRaceOnSamplesLoggedBeforeSeries,
  TestTombstoneCleanRetentionLimitsRace, TestDelete_e2e,
  TestHeadSeriesChunkRace, TestCancelCompactions). Combined they
  pushed the package past go test's default 10m per-package timeout
  in CI under -race + coverage. The functionality is exercised by
  pp-pkg/tsdb in our matrix.
- ci(go-tests-all-pkgs): bump per-package -timeout to 20m to give
  remaining heavy upstream packages more headroom under
  -race+coverage.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants