Skip to content

ci: run unit tests with -race, pin test tooling, add a ci-ok aggregate check - #14321

Merged
glours merged 4 commits into
docker:mainfrom
ndeloof:ci/stability-hardening
Oct 12, 2026
Merged

glours merged 4 commits into
docker:mainfrom
ndeloof:ci/stability-hardening

Conversation

@ndeloof

@ndeloof ndeloof commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What this PR does, in one sentence

Makes the unit-test CI stricter and less dependent on outside factors: races are now detected, test tooling is pinned, two timing-fragile tests get a safe margin, and a single ci-ok check summarizes the gating jobs.

Context

  • The unit suite runs without the race detector, so a data race in the concurrent code (scheduler, watch, executor) only surfaces if it happens to corrupt a result.
  • gotestsum and gofumpt are fetched at @latest when the tests or make fmt run, so an upstream release can break the build without any change in this repository.
  • TestBuildTLS waits a fixed second for the dind certificates, and the relay streaming test leaves only 150ms between a chunk and the 300ms idle grace. Both can fail on a loaded runner.
  • Branch protection has to list every job and every e2e matrix entry, so reshaping the matrix means editing repository settings.

What the PR brings

  • Unit tests run with -race (the test stage now builds with cgo). The suite is race-clean today: 1100 tests, no report.
  • gotestsum and gofumpt are pinned to explicit versions.
  • TestBuildTLS polls for the client certificates instead of sleeping, and the relay test streams 100ms chunks against a 1s grace.
  • A new ci-ok job fails if any gating job failed, was cancelled or was skipped; only the pull-request-only image tests may be skipped. coverage (external service) and release (tags only) are deliberately left out. It changes nothing by itself: a maintainer can make it the required check afterwards.

The other time.Sleep calls in the tests were left alone: they either run under synctest, deliberately widen a race window, or assert that nothing happens.

🤖 Generated with Claude Code

The unit and e2e test runs fetched gotestsum@latest and `make fmt`
gofumpt@latest at execution time, so a new upstream release could break
the build with no change in this repository. Pin both to explicit
versions.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The unit suite ran without -race, so data races in the concurrent code
paths (scheduler, watch, executor) were only caught if they happened to
corrupt a result. Build the test stage with cgo (gcc + musl-dev) and
pass -race to gotestsum. The suite is race-clean: 1100 tests, no report.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
…ming test

TestBuildTLS slept a fixed second after the dind daemon logged that it
listens, hoping the client certificates were written; poll for them
instead. TestForwardKeepsStreamingAfterHalfClose had 150ms of margin
between each chunk and the 300ms idle grace, which a loaded CI runner can
eat; use 100ms chunks against a 1s grace.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Branch protection currently has to list each job and every entry of the
e2e matrix, so changing the matrix means changing repository settings.
Add a single ci-ok job that fails if any gating job failed or was
cancelled and accepts jobs skipped by their own condition, so it can be
the only required check.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
ndeloof requested review from a team as code owners October 9, 2026 13:00
@ndeloof
ndeloof requested review from docker-agent and glours October 9, 2026 13:00

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

Comment thread .github/workflows/ci.yml Resolved
@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@glours glours left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glours
glours merged commit e301653 into docker:main Oct 12, 2026
66 of 67 checks passed
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.

3 participants