You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewritten. This issue originally proposed repairing the dorny/test-reporter configuration in ci-test.yml. That premise was wrong. jacaudi/template — the canonical copier template for this fleet's pipeline — uses no test reporter at all, so the fix is to adopt the template's stage rather than repair a hand-rolled one. The original symptom and the two real defects are preserved below for the record.
Symptom
The test job introduced by #39 fails at the Test report step:
Error: Input variable 'reporter' is set to invalid value 'golang-json'
ok github.com/.../internal/controller 77.0s
ok github.com/.../internal/ipam 0.3s
ok github.com/.../internal/iptables 1.0s
CI also logged generated files match the types, so the codegen drift gate passed too.
Two real defects, both dissolved by adopting the template
1. A reporter failure masks the test result.Fail if tests failed is the step that actually inspects test-report.json for "Action":"fail", and it is skipped once Test report errors. Today a genuinely broken test and a passing one both produce a red ci for the same reason — which defeats the continue-on-error + explicit-gate design.
2. The declared permissions could not have worked anyway.ci-test.yml declares permissions: contents: read, and the run log confirms the job received only Contents: read / Metadata: read. dorny/test-reporter publishes a check run and needs checks: write. Even a valid reporter value would have failed.
The actual resolution
Replace the hand-rolled ci-test.yml with the template's ci-integration.yml (examples/operator-envtest), which has no reporter, no continue-on-error, and therefore neither defect:
- name: go test (envtest)run: go test ./... -race -tags=integration
go test exits non-zero on failure and the step fails. That is the whole gate.
Three things to reconcile while adopting it, none blocking:
envtest version. The template pins 1.34.x and installs setup-envtest from controller-runtime v0.22.1; this repo is on controller-runtime v0.18.5 / envtest 1.30.0. Keep the repo's versions until the Kubernetes stack upgrade (the follow-up named in [P0] Bump vulnerable transitive dependencies blocking the lint gate #40) lands, rather than mixing a v0.22 tool against v0.18 code.
-race. This repo has never run its tests with the race detector. Expect this to surface findings on first run; they are real and worth fixing, but they are new work rather than a regression.
-tags=integration. The template's stage builds with that tag; this repo's envtest suite carries no build tag. Either add the tag to the suite or drop it from the stage — decide deliberately, because getting it wrong means the stage compiles and runs zero tests while reporting success.
Acceptance criteria
ci-test.yml replaced by the template's ci-integration.yml
test stage green on a branch with passing tests
test stage red on a branch with a deliberately failing test — verified, not assumed
The stage demonstrably runs a non-zero number of tests (guards the -tags trap)
Declared permissions match what the steps actually need
Part of the CI alignment onto jacaudi/template. Blocks #37.
Symptom
The
testjob introduced by #39 fails at the Test report step:The tests themselves are fine
Verified locally on the #39 branch with envtest:
CI also logged
generated files match the types, so the codegen drift gate passed too.Two real defects, both dissolved by adopting the template
1. A reporter failure masks the test result.
Fail if tests failedis the step that actually inspectstest-report.jsonfor"Action":"fail", and it is skipped onceTest reporterrors. Today a genuinely broken test and a passing one both produce a redcifor the same reason — which defeats thecontinue-on-error+ explicit-gate design.2. The declared permissions could not have worked anyway.
ci-test.ymldeclarespermissions: contents: read, and the run log confirms the job received onlyContents: read/Metadata: read.dorny/test-reporterpublishes a check run and needschecks: write. Even a validreportervalue would have failed.The actual resolution
Replace the hand-rolled
ci-test.ymlwith the template'sci-integration.yml(examples/operator-envtest), which has no reporter, nocontinue-on-error, and therefore neither defect:go testexits non-zero on failure and the step fails. That is the whole gate.Three things to reconcile while adopting it, none blocking:
1.34.xand installssetup-envtestfrom controller-runtimev0.22.1; this repo is on controller-runtimev0.18.5/ envtest1.30.0. Keep the repo's versions until the Kubernetes stack upgrade (the follow-up named in [P0] Bump vulnerable transitive dependencies blocking the lint gate #40) lands, rather than mixing a v0.22 tool against v0.18 code.-race. This repo has never run its tests with the race detector. Expect this to surface findings on first run; they are real and worth fixing, but they are new work rather than a regression.-tags=integration. The template's stage builds with that tag; this repo's envtest suite carries no build tag. Either add the tag to the suite or drop it from the stage — decide deliberately, because getting it wrong means the stage compiles and runs zero tests while reporting success.Acceptance criteria
ci-test.ymlreplaced by the template'sci-integration.ymlteststage green on a branch with passing teststeststage red on a branch with a deliberately failing test — verified, not assumed-tagstrap)Part of the CI alignment onto
jacaudi/template. Blocks #37.