LuciferYang opened a new pull request, #2776: URL: https://github.com/apache/uniffle/pull/2776
### What changes were proposed in this pull request? Fix the `kubernetes / java 8 + go 1.19` CI job, which has been failing on every `master` push since 2026-02-12. - **`deploy/kubernetes/operator/hack/download-envtest.sh`** (new): downloads the envtest binaries (`etcd`, `kube-apiserver`, `kubectl`) straight from the [controller-tools GitHub releases](https://github.com/kubernetes-sigs/controller-tools/releases), resolving the asset URL and its sha512 from [`envtest-releases.yaml`](https://raw.githubusercontent.com/kubernetes-sigs/controller-tools/main/envtest-releases.yaml), verifying the checksum, and unpacking into `local/controller-tools/envtest`. Already-present binaries are reused (so an offline build can pre-populate that directory), and `ENVTEST_INDEX_URL` allows pointing at a mirror. - **`Makefile`**: the `envtest` target calls that script instead of `go install`-ing `setup-envtest`; `KUBEBUILDER_ASSETS` now points at the fixed `local/controller-tools/envtest` path. - **`Makefile`**: `make test` asserts the binaries are actually there and fails with a message naming the real problem, instead of silently running `go test` with an empty `KUBEBUILDER_ASSETS`. `ENVTEST_K8S_VERSION` stays at `1.24.1` — those assets are still published in the new location, so this is not a Kubernetes version bump. No Go version bump either. ### Why are the changes needed? Fix: #2775 `Makefile` pinned `setup-envtest` to `sigs.k8s.io/controller-runtime/tools/[email protected]`, which predates controller-runtime v0.19 and therefore still defaults `--use-deprecated-gcs=true`, downloading only from `gs://kubebuilder-tools`. That bucket is no longer publicly readable: ``` storage.googleapis.com/storage/v1/b/kubebuilder-tools/o/kubebuilder-tools-1.24.1-linux-amd64.tar.gz -> 401 storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.24.1-linux-amd64.tar.gz -> 403 ``` so [the job](https://github.com/apache/uniffle/actions/runs/30332932903/job/90192064860) logs: ``` unable to fetch checksum for requested version: unable fetch metadata for kubebuilder-tools-1.24.1-linux-amd64.tar.gz -- got status "401 Unauthorized" from GCS export KUBEBUILDER_ASSETS=; go test ./... -coverprofile cover.out ``` The old recipe wrapped the lookup in `$(shell ...)`, so the failure was swallowed, `KUBEBUILDER_ASSETS` became the empty string, and `go test` ran anyway — surfacing as `exec: "etcd": executable file not found in $PATH` in `BeforeSuite` of both `pkg/controller/controller` and `pkg/webhook`. The error pointed at `etcd` rather than at the download, which is why this went unnoticed. (Also note `-DskipUTs -DskipITs` on the `-Pkubernetes` build only skips surefire/failsafe, not this Go `make test`.) Net effect: the operator's two envtest suites have not actually run in CI for ~5 months. The alternative — upgrading `setup-envtest` to a version supporting `--use-deprecated-gcs=false --index ...` — needs at least controller-runtime v0.17.6, whose `setup-envtest` requires Go >= 1.20, while CI runs Go 1.19 (`build.yml:112`). Fetching the tarball directly keeps the fix self-contained. ### Does this PR introduce _any_ user-facing change? No. Build/test tooling only. ### How was this patch tested? Locally in `deploy/kubernetes/operator`: 1. `make envtest` from a clean `local/` — downloads `envtest-v1.24.1-<os>-<arch>.tar.gz`, checksum verifies, and `local/controller-tools/envtest/{etcd,kube-apiserver,kubectl}` land in place. 2. Re-running `make envtest` is a no-op ("envtest binaries already present"). 3. `make test` (Go 1.19.13 toolchain, matching CI) — full suite green, including the two suites that were failing: ``` ok .../pkg/controller/controller 19.436s coverage: 43.1% of statements ok .../pkg/webhook 15.682s coverage: 65.3% of statements ``` 4. Failure paths: a non-existent version (`9.99.9`) exits 1 with `envtest-v9.99.9-... not found in <index>` instead of hanging or producing an empty path; removing `local/` and invoking the `test` recipe directly fails with `envtest binaries are missing from ..., run 'make envtest' first`. 5. `./mvnw apache-rat:check -Pkubernetes -pl :rss-kubernetes` — the new script is reported `AL` (license header present). The 4 remaining `!?????` entries (`go.mod`, `go.sum`, `PROJECT`, `cover.out`) are pre-existing and unrelated to this change; `cover.out` is a gitignored test artifact. Left `git status` clean of tracked changes afterwards. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
