chore(devex): expose 'make check' / 'check-all' on the existing Makefile (backend#1606) - #465
Open
LukasWodka wants to merge 1 commit into
Open
chore(devex): expose 'make check' / 'check-all' on the existing Makefile (backend#1606)#465LukasWodka wants to merge 1 commit into
LukasWodka wants to merge 1 commit into
Conversation
…ile (backend#1606)
Today every repo in the org has a different incantation for "run your
tests": `python manage.py test` here, `yarn test:coverage` there,
`make ci` in cli, `pytest tests/ -m "not slow"` somewhere else. That
makes "run your tests before you push" a rule you can only obey if you
already know the repo — which means it is not really a rule, it is
tribal knowledge with a rule's wording. The people most likely to break
it are exactly the people least likely to know the incantation.
backend#1606 fixes that by giving every active repo the same three
targets:
make check lint + fast tests. Budget: UNDER 60 SECONDS.
make check-all everything CI runs, minus the CI-only heavy suites.
make setup install what those targets need.
The 60-second budget is not decoration. It is the property that decides
whether anyone runs the thing: a `make check` that takes ten minutes is
a rule people learn to skip, and skipping one rule teaches skipping
others. So the split between `check` and `check-all` is drawn on
measured wall-clock time, not on taste.
The Makefile is a THIN WRAPPER. Every command in it was lifted from the
workflow that already runs it. It adds no tool, no config, and no rule,
and it changes no CI workflow — making CI call `make check` is a
separate, later wave (decision 2 on backend#1606), deliberately kept out
of this PR so that a Makefile bug cannot redden the pipeline. No
pre-commit or pre-push hook is installed here either; that is step 4.
In this repo
------------
cli already had a Makefile with a `ci` target, so this EXTENDS it rather
than replacing it. `ci` keeps its name — too much muscle memory and too
many docs point at it — and `check-all` is an alias for it.
`make check` — MEASURED 19.6 s, versus 56 s for the same set with the
race detector on:
vet + test-fast + fmt-check + file-budget + check-style
`test-fast` is new: `go test ./...` without -race. That single flag is
the difference between fitting the budget and not (18 s vs 56 s for
identical assertions), and `ci` still runs the -race form, so no race
signal is lost from the PR gate.
Held back from `check` for measured reasons:
* -race 3x the wall clock for the same assertions.
* lint/lint-full `go run tool@version` builds from source on a cold
cache; golangci-lint alone is 1-2 minutes.
* vulncheck needs https://vuln.go.dev.
* schema-check fetches data-ingestors at the pinned ref.
* deadcode another `go run tool@version` fetch.
The k3d e2e suite stays CI-only by name, per decision 1 on backend#1606.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Today every repo in the org has a different incantation for "run your
tests":
python manage.py testhere,yarn test:coveragethere,make ciin cli,pytest tests/ -m "not slow"somewhere else. Thatmakes "run your tests before you push" a rule you can only obey if you
already know the repo — which means it is not really a rule, it is
tribal knowledge with a rule's wording. The people most likely to break
it are exactly the people least likely to know the incantation.
backend#1606 fixes that by giving every active repo the same three
targets:
make check lint + fast tests. Budget: UNDER 60 SECONDS.
make check-all everything CI runs, minus the CI-only heavy suites.
make setup install what those targets need.
The 60-second budget is not decoration. It is the property that decides
whether anyone runs the thing: a
make checkthat takes ten minutes isa rule people learn to skip, and skipping one rule teaches skipping
others. So the split between
checkandcheck-allis drawn onmeasured wall-clock time, not on taste.
The Makefile is a THIN WRAPPER. Every command in it was lifted from the
workflow that already runs it. It adds no tool, no config, and no rule,
and it changes no CI workflow — making CI call
make checkis aseparate, later wave (decision 2 on backend#1606), deliberately kept out
of this PR so that a Makefile bug cannot redden the pipeline. No
pre-commit or pre-push hook is installed here either; that is step 4.
In this repo
cli already had a Makefile with a
citarget, so this EXTENDS it ratherthan replacing it.
cikeeps its name — too much muscle memory and toomany docs point at it — and
check-allis an alias for it.make check— MEASURED 19.6 s, versus 56 s for the same set with therace detector on:
vet + test-fast + fmt-check + file-budget + check-style
test-fastis new:go test ./...without -race. That single flag isthe difference between fitting the budget and not (18 s vs 56 s for
identical assertions), and
cistill runs the -race form, so no racesignal is lost from the PR gate.
Held back from
checkfor measured reasons:go run tool@versionbuilds from source on a coldcache; golangci-lint alone is 1-2 minutes.
go run tool@versionfetch.The k3d e2e suite stays CI-only by name, per decision 1 on backend#1606.
Related
Step 1 of tracebloc/backend#1606 — a
Makefilewith a uniformchecktarget in every active repo. One PR per repo; this is this repo's.Type of change
Test plan
make checkrun for real: green in 19.6 s. The same set with-racemeasured at 56 s, which is exactly why
test-fastexists.make helpand thedry runs of every target parse clean;
ciis unchanged and still runstest(with
-race).No CI workflow is touched in this PR. CI parity — making the workflows call
make check— is decision 2 on backend#1606 and lands as its own wave, deliberately after the Makefiles exist and are proven locally. No pre-commit or pre-push hook is installed here either; that is step 4.Checklist
.PHONYon every target,helpis the default goalNote
Low Risk
Makefile-only developer-experience wrappers;
cibehavior is unchanged and no CI or runtime code is modified.Overview
Aligns tracebloc/cli with backend#1606 by exposing the same three Makefile entry points as other org repos:
make check(fast pre-push gate),make check-all(alias for existingci), andmake setup(go mod download).make checkrunsvet, newtest-fast(go testwithout-race),fmt-check,file-budget, andcheck-styleso the loop stays under ~60s; race detection, lint, vulncheck, schema-check, and deadcode remain onci/check-all.helpis now the default goal and documents the targets.No CI workflows or hooks are changed—only thin wrappers over commands that already existed.
Reviewed by Cursor Bugbot for commit 8975c68. Bugbot is set up for automated code reviews on this repo. Configure here.