What happened:
Direct package-level Go tests for the Kubernetes executor are not self-contained. Running go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1 without preinstalled envtest assets fails while starting envtest.Environment with exec: "etcd": executable file not found in $PATH or fork/exec /usr/local/kubebuilder/bin/etcd: no such file or directory.
What you expected to happen:
Direct package tests should either bootstrap envtest prerequisites automatically or skip with a clear message when the assets are unavailable, instead of failing as though the executor logic is broken.
How to reproduce it:
- Ensure
KUBEBUILDER_ASSETS is unset and no local envtest binaries are installed.
- Run
go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1.
- Observe
TestExecutor_ensureSync fail while envtest.Environment starts.
- Compare that with
make test/go, which installs and exports envtest assets via setup-envtest in Makefile before running the Go tests.
Environment:
piped version: repository checkout on 2026-07-11 (upstream/master fetched to d720a26a during validation)
control-plane version: Not applicable
- Others: reproduced locally during repository assessment
Summary
Direct Go tests for the Kubernetes executor rely on envtest binaries that are only provisioned by the Makefile wrapper.
Affected Area
pkg/app/piped/executor/kubernetes/sync_test.go, Makefile
Expected Behaviour
The test should either provision envtest requirements or skip with a clear environment-related message.
Actual Behaviour
The test fails at envtest startup when envtest binaries are not available.
Technical Evidence
pkg/app/piped/executor/kubernetes/sync_test.go creates envtest.Environment directly and calls Start().
Makefile provisions setup-envtest and exports KUBEBUILDER_ASSETS for make test/go.
- Reproduced failure:
go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1
Error: Received unexpected error: unable to start control plane itself: failed to start the controlplane. retried 5 times: exec: "etcd": executable file not found in $PATH
Suspected Root Cause
The test assumes envtest binaries are already available, but that prerequisite is encoded only in the Make target and not in the test itself.
Proposed Direction
Add an explicit envtest asset preflight in the test so it either uses available binaries or skips with a clear message when the environment is missing the required assets.
Acceptance Criteria
- Direct
go test on the package no longer reports a misleading functional failure when envtest assets are missing.
make test/go continues to run the test unchanged when envtest assets are provisioned.
- Contributors can distinguish environmental setup issues from real executor regressions immediately.
What happened:
Direct package-level Go tests for the Kubernetes executor are not self-contained. Running
go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1without preinstalled envtest assets fails while startingenvtest.Environmentwithexec: "etcd": executable file not found in $PATHorfork/exec /usr/local/kubebuilder/bin/etcd: no such file or directory.What you expected to happen:
Direct package tests should either bootstrap envtest prerequisites automatically or skip with a clear message when the assets are unavailable, instead of failing as though the executor logic is broken.
How to reproduce it:
KUBEBUILDER_ASSETSis unset and no local envtest binaries are installed.go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1.TestExecutor_ensureSyncfail whileenvtest.Environmentstarts.make test/go, which installs and exports envtest assets viasetup-envtestinMakefilebefore running the Go tests.Environment:
pipedversion: repository checkout on 2026-07-11 (upstream/masterfetched tod720a26aduring validation)control-planeversion: Not applicableSummary
Direct Go tests for the Kubernetes executor rely on envtest binaries that are only provisioned by the Makefile wrapper.
Affected Area
pkg/app/piped/executor/kubernetes/sync_test.go,MakefileExpected Behaviour
The test should either provision envtest requirements or skip with a clear environment-related message.
Actual Behaviour
The test fails at envtest startup when envtest binaries are not available.
Technical Evidence
pkg/app/piped/executor/kubernetes/sync_test.gocreatesenvtest.Environmentdirectly and callsStart().Makefileprovisionssetup-envtestand exportsKUBEBUILDER_ASSETSformake test/go.go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1Error: Received unexpected error: unable to start control plane itself: failed to start the controlplane. retried 5 times: exec: "etcd": executable file not found in $PATHSuspected Root Cause
The test assumes envtest binaries are already available, but that prerequisite is encoded only in the Make target and not in the test itself.
Proposed Direction
Add an explicit envtest asset preflight in the test so it either uses available binaries or skips with a clear message when the environment is missing the required assets.
Acceptance Criteria
go teston the package no longer reports a misleading functional failure when envtest assets are missing.make test/gocontinues to run the test unchanged when envtest assets are provisioned.