Skip to content

ci: Run the test suite once, in the required check - #982

Merged
vvoytovych merged 1 commit into
mainfrom
ci/run-the-suite-once
Nov 3, 2026
Merged

vvoytovych merged 1 commit into
mainfrom
ci/run-the-suite-once

Conversation

@vvoytovych

@vvoytovych vvoytovych commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Related to #978.

The required check, ci / Build and test, runs go test ./... with envtest 1.37.0 on every pull request and on main. "IAM API testing" ran the same go test ./... on every push that changed Go files. It is not required, so it gated nothing, and each pull request ran the suite twice. It goes, as datum-cloud/network-services-operator#849 did for NSO, and CI takes the concurrency group the other workflows share.

Where each step of IAM API testing runs now

step where
go mod download CI: go test downloads what it needs
envtest 1.37.0 CI: setup-envtest use 1.37.0, pinned by commit
go test ./... CI, with a 10 min timeout instead of 5

Corner cases

case what happens
A push to a branch with no pull request No suite run until its pull request opens. Milo has no release branches; it releases by tag from main.
A newer push to a pull request The older CI run is cancelled.
A push to main Its run is never cancelled: cancel-in-progress is false on the default branch.

Test plan

  • ci / Build and test ran the suite on fix: Decide a claim's requests of one type together #978's pull request and on this one: the quota controller package's envtests took 51.7 s and 52.3 s.
  • actionlint passes on ci.yaml. The concurrency group is the one in fix-newlines.yaml, test-environment-validation.yaml and test-prometheus-rules.yaml, word for word.
  • Nothing in the repository names testing.yaml or "IAM API testing".
  • After the merge: the push to main ran CI's suite (run, the quota controller package in 52.6 s), and "IAM API testing" did not run.

The required check, ci / Build and test, runs go test ./... with envtest on every pull request and on main.
IAM API testing ran the same go test ./... on every push, gated nothing, and doubled each run. It goes, and CI takes
the concurrency group the other workflows share.
@vvoytovych vvoytovych self-assigned this Nov 3, 2026
@vvoytovych
vvoytovych marked this pull request as ready for review November 3, 2026 20:12
@vvoytovych
vvoytovych requested a review from ecv November 3, 2026 20:12

@ecv ecv 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.

Approve.

"IAM API testing" ran the same go test ./... with envtest 1.37.0 that the required ci / Build and test already runs (ci.yaml installs setup-envtest, uses 1.37.0, and runs go test ./... -timeout 10m), so deleting it removes a duplicate run without dropping coverage. ci / Build and test stays the only check the required-ci ruleset names, so no gate disappears.

  • ci.yaml gains the same concurrency group the deleted workflow had: pull-request and branch runs cancel superseded ones, main runs never cancel.
  • The deleted job ran on every push that touched Go, including branches without a PR; those now get a run only once a PR is opened, which is where the gate is.

Follow-ups:

  • The deleted job had a 5-minute test timeout against ci.yaml's 10; a suite that drifts past 5 minutes will no longer be noticed early. Fine, but worth knowing if test time is watched.

@vvoytovych

Copy link
Copy Markdown
Contributor Author

On the timeout: go test -timeout bounds each package's test binary, not the whole suite. The slowest package, internal/controllers/iam, took 81.8 s on this pull request's run, so it is far from 5 minutes and from 10. The deleted job's test step took about 8 minutes on main under the 5-minute bound, so that bound never measured the suite. ci.yaml already had 10 minutes, and I left it as it was.

@vvoytovych
vvoytovych merged commit 4a165c0 into main Nov 3, 2026
8 checks passed
@vvoytovych
vvoytovych deleted the ci/run-the-suite-once branch November 3, 2026 20:33
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