L. C. Hsieh created SPARK-59482:
-----------------------------------
Summary: Fix the kubectl wait race in the e2e jobs and add a
.dockerignore
Key: SPARK-59482
URL: https://issues.apache.org/jira/browse/SPARK-59482
Project: Spark
Issue Type: Sub-task
Components: Connect
Affects Versions: connect-gateway-0.1.0
Reporter: L. C. Hsieh
Assignee: L. C. Hsieh
Two CI papercuts, unrelated to any single walkthrough.
First, a race that makes the e2e jobs randomly red. Every job waited for
its pods with
kubectl wait --for=condition=ready pod -l <selector>
but that command fails immediately with "no matching resources found"
when the selector matches zero pods, and --timeout governs only how long
it waits for the condition, not for the resource to appear. A Deployment
created moments earlier, whose ReplicaSet has not yet produced a pod,
loses the race. This is what turned e2e-auth-jwt red on the PR that
added the multi-replica job, which had not touched that job at all; a
rerun passed.
All eight call sites now use `kubectl rollout status deployment/...`,
which waits for the controller instead of for a label match. Every
backend Deployment declares a readinessProbe, and a Deployment rollout
only completes once its pods pass readiness, so this is the same
guarantee without the race. Two of the jobs already used rollout status
for the gateway and Redis; this makes the rest consistent.
Second, the repo has no .dockerignore, so `docker build .` sends the
entire tree to the daemon -- including target/, which is tens of
gigabytes once anyone has built locally. CI never noticed because a
fresh checkout has no target/, but every contributor building the image
locally pays it, and at that size it looks like a hang rather than a
transfer.
Verified: with the new .dockerignore the build context drops from over
15 GB to under 1 MB, and the image still builds and its gateway binary
still runs. The exclusions deliberately keep everything the build reads
-- the crates, proto/ (genproto's build.rs panics on an empty proto
directory), Cargo.toml, Cargo.lock and rust-toolchain.toml.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]