Skip to content

Commit 8cf890e

Browse files
authored
Revert "WIP: [Slice] Test E2E quick rebuild. (#593)"
This reverts commit 303a896.
1 parent 303a896 commit 8cf890e

File tree

4 files changed

+13
-54
lines changed

4 files changed

+13
-54
lines changed

slice/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ E2E_K8S_FULL_VERSION ?= $(filter $(E2E_K8S_VERSION).%,$(E2E_K8S_VERSIONS))
6464
E2E_K8S_FULL_VERSION := $(or $(E2E_K8S_FULL_VERSION),$(E2E_K8S_VERSION).0)
6565
E2E_KIND_VERSION ?= kindest/node:v$(E2E_K8S_FULL_VERSION)
6666
E2E_RUN_ONLY_ENV ?= false
67-
E2E_RUN_ONLY_SLICE ?= false
6867

6968
.PHONY: all
7069
all: build
@@ -123,7 +122,7 @@ run-test-e2e-%:
123122
E2E_KIND_VERSION="kindest/node:v$(K8S_VERSION)" KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) CREATE_KIND_CLUSTER=$(CREATE_KIND_CLUSTER) \
124123
EXTERNAL_CRDS_DIR=$(EXTERNAL_CRDS_DIR) ARTIFACTS="$(ARTIFACTS)/$@" IMAGE_TAG=$(IMAGE_TAG) GINKGO_ARGS="$(GINKGO_ARGS)" \
125124
KUEUE_IMAGE=$(KUEUE_IMAGE) JOBSET_IMAGE=$(JOBSET_IMAGE) \
126-
TEST_LOG_LEVEL=$(TEST_LOG_LEVEL) E2E_RUN_ONLY_ENV=$(E2E_RUN_ONLY_ENV) E2E_RUN_ONLY_SLICE=$(E2E_RUN_ONLY_SLICE) \
125+
TEST_LOG_LEVEL=$(TEST_LOG_LEVEL) E2E_RUN_ONLY_ENV=$(E2E_RUN_ONLY_ENV) \
127126
./hack/e2e-test.sh
128127

129128
.PHONY: lint

slice/README.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,6 @@ is manually re-applied afterwards.
117117

118118
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
119119

120-
## Running e2e tests using custom build
121-
```shell
122-
make kind-image-build test-e2e
123-
```
124-
125-
## Attaching e2e tests to an existing kind cluster
126-
You can use the following approach to start up a kind cluster and then run e2e tests from commandline or VSCode,
127-
attaching them to the existing cluster. For example, suppose you want to test some of the multikueue-e2e tests.
128-
129-
Run `make kind-image-build test-e2e E2E_RUN_ONLY_ENV=true` and wait for the `Do you want to cleanup? [Y/n] ` to appear.
130-
131-
The cluster is ready, and now you can run tests from another terminal:
132-
```shell
133-
./bin/ginkgo -focus "JobSet (when )?Creating a JobSet it should create Slice based on created Workload with TPU topology 4x4x4, TPU topology 4 and parallelism 16" -v ./test/e2e/...
134-
```
135-
or from VSCode.
136-
137-
## Quick rebuild Kueue in e2e tests
138-
If the `E2E_RUN_ONLY_ENV` variable is set, you can rebuild **only the Kueue image** without needing to rebuild the entire cluster.
139-
```shell
140-
make kind-image-build test-e2e E2E_RUN_ONLY_ENV=true E2E_RUN_ONLY_SLICE=true
141-
```
142-
143120
## License
144121

145122
Copyright The Kubernetes Authors.

slice/hack/e2e-common.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ function cluster_slice_deploy {
111111
local build_output
112112
build_output=$($KUSTOMIZE build "${ROOT_DIR}/config/dev")
113113
build_output="${build_output//$DEFAULT_SLICE_NAMESPACE/$SLICE_NAMESPACE}"
114-
# Add rollout-timestamp annotation to the Deployment's pod template
115-
local timestamp
116-
timestamp=$(date +%s) # Unix timestamp for uniqueness
117-
build_output=$(yq eval "select(.kind == \"Deployment\").spec.template.metadata.annotations += {\"kubectl.kubernetes.io/timestamp\": \"$timestamp\"}" - <<< "$build_output")
118114
echo "$build_output" | kubectl apply --kubeconfig="$1" --server-side -f -
119115

120116
(cd "${ROOT_DIR}/config/manager" && $KUSTOMIZE edit set image controller="$initial_image")

slice/hack/e2e-test.sh

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,21 @@ function startup {
4444
fi
4545
}
4646

47-
if [[ "${E2E_RUN_ONLY_SLICE}" != 'true' ]]; then
48-
trap cleanup EXIT
49-
startup
50-
prepare_docker_images
51-
fi
52-
47+
trap cleanup EXIT
48+
startup
49+
prepare_docker_images
5350
kind_load "$KIND_CLUSTER_NAME" ""
5451

55-
if [[ "${E2E_RUN_ONLY_SLICE}" != 'true' ]]; then
56-
# We need to wait for Kueue to become available;
57-
# otherwise, we encounter the error: "no endpoints available for service 'kueue-webhook-service'"
58-
echo "Waiting for Kueue to become available..."
59-
kubectl wait deploy/kueue-controller-manager -nkueue-system --for=condition=available --timeout=5m
60-
fi
52+
# We need to wait for Kueue to become available;
53+
# otherwise, we encounter the error: "no endpoints available for service 'kueue-webhook-service'"
54+
echo "Waiting for Kueue to become available..."
55+
kubectl wait deploy/kueue-controller-manager -nkueue-system --for=condition=available --timeout=5m
6156

6257
cluster_slice_deploy ""
6358

64-
if [ "$E2E_RUN_ONLY_ENV" = "true" ]; then
65-
if [[ "${E2E_RUN_ONLY_SLICE}" != 'true' ]]; then
66-
read -rp "Do you want to cleanup? [Y/n] " reply
67-
if [[ "$reply" =~ ^[nN]$ ]]; then
68-
trap - EXIT
69-
echo "Skipping cleanup for kind cluster."
70-
echo -e "\nKind cluster cleanup:\n kind delete cluster --name $KIND_CLUSTER_NAME"
71-
fi
72-
fi
73-
exit 0
59+
if [ "$E2E_RUN_ONLY_ENV" == 'true' ]; then
60+
read -rp "Press Enter to cleanup."
61+
else
62+
# shellcheck disable=SC2086
63+
$GINKGO $GINKGO_ARGS --junit-report=junit.xml --json-report=e2e.json --output-dir="$ARTIFACTS" -v ./test/e2e/...
7464
fi
75-
76-
# shellcheck disable=SC2086
77-
$GINKGO $GINKGO_ARGS --junit-report=junit.xml --json-report=e2e.json --output-dir="$ARTIFACTS" -v ./test/e2e/...

0 commit comments

Comments
 (0)