Skip to content

Commit 6884226

Browse files
raballewclaude
andcommitted
fix: remove old-controller compat test (v0.7.0 has no operator installer)
v0.7.0 predates the monorepo merge and was only deployable via OCI Helm chart. With Helm fully removed, the old-controller compat test cannot deploy a v0.7.0 controller. Remove the test, its CI job, and simplify the compat infrastructure to only support the old-client scenario. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4ad5fb3 commit 6884226

6 files changed

Lines changed: 21 additions & 364 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -65,39 +65,6 @@ jobs:
6565
env:
6666
CI: true
6767

68-
# ============================================================================
69-
# Compatibility tests: cross-version interop between controller and client/exporter
70-
# These jobs can be removed once 0.7.x controller support is no longer needed.
71-
# ============================================================================
72-
73-
e2e-compat-old-controller:
74-
needs: changes
75-
if: needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch'
76-
runs-on: ubuntu-24.04
77-
timeout-minutes: 60
78-
steps:
79-
- name: Checkout repository
80-
uses: actions/checkout@v4
81-
82-
- name: Install uv
83-
uses: astral-sh/setup-uv@v7
84-
85-
- name: Install Go
86-
uses: actions/setup-go@v5
87-
with:
88-
go-version: "1.22"
89-
90-
- name: Setup compat environment (old controller v0.7.0)
91-
run: make e2e-compat-setup COMPAT_SCENARIO=old-controller
92-
env:
93-
CI: true
94-
COMPAT_CONTROLLER_TAG: v0.7.0
95-
96-
- name: Run compat tests (old controller + new client/exporter)
97-
run: make e2e-compat-run COMPAT_TEST=old-controller
98-
env:
99-
CI: true
100-
10168
e2e-compat-old-client:
10269
needs: changes
10370
if: needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch'
@@ -115,13 +82,13 @@ jobs:
11582
with:
11683
go-version: "1.22"
11784

118-
- name: Setup compat environment (old client v0.7.0)
119-
run: make e2e-compat-setup COMPAT_SCENARIO=old-client
85+
- name: Setup compat environment (old client v0.7.1)
86+
run: make e2e-compat-setup
12087
env:
12188
CI: true
12289
COMPAT_CLIENT_VERSION: "0.7.1"
12390

12491
- name: Run compat tests (new controller + old client/exporter)
125-
run: make e2e-compat-run COMPAT_TEST=old-client
92+
run: make e2e-compat-run
12693
env:
12794
CI: true

Makefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,17 @@ e2e-clean:
164164
test-e2e: e2e-run
165165

166166
# Compatibility E2E testing (cross-version tests, separate from main e2e)
167-
COMPAT_SCENARIO ?= old-controller
168-
COMPAT_TEST ?= old-controller
169-
COMPAT_CONTROLLER_TAG ?= v0.7.0
170167
COMPAT_CLIENT_VERSION ?= 0.7.1
171168

172169
.PHONY: e2e-compat-setup
173170
e2e-compat-setup:
174-
@echo "Setting up compat e2e (scenario: $(COMPAT_SCENARIO))..."
175-
@COMPAT_SCENARIO=$(COMPAT_SCENARIO) COMPAT_CONTROLLER_TAG=$(COMPAT_CONTROLLER_TAG) \
176-
COMPAT_CLIENT_VERSION=$(COMPAT_CLIENT_VERSION) bash e2e/compat/setup.sh
171+
@echo "Setting up compat e2e (old client v$(COMPAT_CLIENT_VERSION))..."
172+
@COMPAT_CLIENT_VERSION=$(COMPAT_CLIENT_VERSION) bash e2e/compat/setup.sh
177173

178174
.PHONY: e2e-compat-run
179175
e2e-compat-run:
180-
@echo "Running compat e2e (test: $(COMPAT_TEST))..."
181-
@COMPAT_TEST=$(COMPAT_TEST) bash e2e/compat/run.sh
176+
@echo "Running compat e2e (old client)..."
177+
@COMPAT_TEST=old-client bash e2e/compat/run.sh
182178

183179
# Per-project clean targets
184180
.PHONY: clean-python clean-protocol clean-controller clean-e2e

e2e/compat/run.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This script runs the compatibility test suite (assumes setup.sh was run first)
44
#
55
# Environment variables:
6-
# COMPAT_TEST - Which test to run: "old-controller" or "old-client"
6+
# COMPAT_TEST - Which test to run (default: "old-client")
77

88
set -euo pipefail
99

@@ -90,21 +90,17 @@ run_tests() {
9090
# Setup bats environment
9191
setup_bats_env
9292

93-
COMPAT_TEST="${COMPAT_TEST:-old-controller}"
93+
COMPAT_TEST="${COMPAT_TEST:-old-client}"
9494
log_info "Running compat test: $COMPAT_TEST"
9595

9696
case "$COMPAT_TEST" in
97-
old-controller)
98-
bats -x --show-output-of-passing-tests --verbose-run \
99-
"$SCRIPT_DIR/tests-old-controller.bats"
100-
;;
10197
old-client)
10298
export OLD_JMP
10399
bats -x --show-output-of-passing-tests --verbose-run \
104100
"$SCRIPT_DIR/tests-old-client.bats"
105101
;;
106102
*)
107-
log_error "Unknown COMPAT_TEST: $COMPAT_TEST (expected 'old-controller' or 'old-client')"
103+
log_error "Unknown COMPAT_TEST: $COMPAT_TEST (expected 'old-client')"
108104
exit 1
109105
;;
110106
esac
@@ -115,7 +111,7 @@ main() {
115111
export JS_NAMESPACE="${JS_NAMESPACE:-jumpstarter-lab}"
116112

117113
log_info "=== Jumpstarter Compatibility E2E Test Runner ==="
118-
log_info "Test: ${COMPAT_TEST:-old-controller}"
114+
log_info "Test: ${COMPAT_TEST:-old-client}"
119115
log_info "Namespace: $JS_NAMESPACE"
120116
log_info "Repository Root: $REPO_ROOT"
121117
echo ""

e2e/compat/setup.sh

Lines changed: 9 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
# Uses operator-based deployment.
77
#
88
# Environment variables:
9-
# COMPAT_SCENARIO - "old-controller" or "old-client" (required)
10-
# COMPAT_CONTROLLER_TAG - Controller image tag for old-controller scenario (default: v0.7.0)
119
# COMPAT_CLIENT_VERSION - PyPI version for old-client scenario (default: 0.7.1)
1210

1311
set -euo pipefail
@@ -24,9 +22,6 @@ REPO_ROOT="$(cd "$E2E_DIR/.." && pwd)"
2422
# Default namespace for tests
2523
export JS_NAMESPACE="${JS_NAMESPACE:-jumpstarter-lab}"
2624

27-
# Scenario configuration
28-
COMPAT_SCENARIO="${COMPAT_SCENARIO:-old-controller}"
29-
COMPAT_CONTROLLER_TAG="${COMPAT_CONTROLLER_TAG:-v0.7.0}"
3025
COMPAT_CLIENT_VERSION="${COMPAT_CLIENT_VERSION:-0.7.1}"
3126

3227
# Color output
@@ -167,17 +162,6 @@ install_dependencies() {
167162
log_info "Dependencies installed"
168163
}
169164

170-
# Get the external IP for baseDomain
171-
get_external_ip() {
172-
if which ip 2>/dev/null 1>/dev/null; then
173-
ip route get 1.1.1.1 | grep -oP 'src \K\S+'
174-
else
175-
local INTERFACE
176-
INTERFACE=$(route get 1.1.1.1 | grep interface | awk '{print $2}')
177-
ifconfig | grep "$INTERFACE" -A 10 | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | head -n 1
178-
fi
179-
}
180-
181165
# Create kind cluster and install grpcurl
182166
create_cluster() {
183167
log_info "Creating kind cluster..."
@@ -188,46 +172,6 @@ create_cluster() {
188172
log_info "Kind cluster created"
189173
}
190174

191-
deploy_old_controller() {
192-
log_info "Deploying old controller (version: $COMPAT_CONTROLLER_TAG)..."
193-
194-
cd "$REPO_ROOT"
195-
196-
# Compute networking variables
197-
local IP
198-
IP=$(get_external_ip)
199-
BASEDOMAIN="jumpstarter.${IP}.nip.io"
200-
GRPC_ENDPOINT="grpc.${BASEDOMAIN}:8082"
201-
GRPC_ROUTER_ENDPOINT="router.${BASEDOMAIN}:8083"
202-
203-
kubectl config use-context kind-jumpstarter
204-
205-
# Install old controller using operator installer from the release tag
206-
local INSTALLER_URL="https://raw.githubusercontent.com/jumpstarter-dev/jumpstarter/${COMPAT_CONTROLLER_TAG}/controller/deploy/operator/dist/install.yaml"
207-
log_info "Installing old controller via operator (version: ${COMPAT_CONTROLLER_TAG})..."
208-
kubectl apply -f "${INSTALLER_URL}" || log_warn "Operator installer may not be available for ${COMPAT_CONTROLLER_TAG}, skipping"
209-
210-
kubectl config set-context --current --namespace=jumpstarter-lab
211-
212-
# Wait for gRPC endpoints
213-
local GRPCURL="${REPO_ROOT}/controller/bin/grpcurl"
214-
log_info "Waiting for gRPC endpoints..."
215-
for ep in ${GRPC_ENDPOINT} ${GRPC_ROUTER_ENDPOINT}; do
216-
local retries=60
217-
log_info " Checking ${ep}..."
218-
while ! ${GRPCURL} -insecure "${ep}" list > /dev/null 2>&1; do
219-
sleep 2
220-
retries=$((retries - 1))
221-
if [ ${retries} -eq 0 ]; then
222-
log_error "${ep} not ready after 120s"
223-
exit 1
224-
fi
225-
done
226-
done
227-
228-
log_info "Old controller deployed"
229-
}
230-
231175
deploy_new_controller() {
232176
log_info "Deploying new controller from HEAD..."
233177

@@ -324,7 +268,7 @@ EOF
324268
# Main execution
325269
main() {
326270
log_info "=== Jumpstarter Compatibility E2E Setup ==="
327-
log_info "Scenario: $COMPAT_SCENARIO"
271+
log_info "Scenario: New Controller + Old Client/Exporter ($COMPAT_CLIENT_VERSION)"
328272
log_info "Namespace: $JS_NAMESPACE"
329273
log_info "Repository Root: $REPO_ROOT"
330274
echo ""
@@ -335,34 +279,20 @@ main() {
335279
create_cluster
336280
echo ""
337281

338-
case "$COMPAT_SCENARIO" in
339-
old-controller)
340-
log_info "Scenario: Old Controller ($COMPAT_CONTROLLER_TAG) + New Client/Exporter"
341-
deploy_old_controller
342-
echo ""
343-
install_jumpstarter
344-
;;
345-
old-client)
346-
log_info "Scenario: New Controller + Old Client/Exporter ($COMPAT_CLIENT_VERSION)"
347-
deploy_new_controller
348-
echo ""
349-
install_jumpstarter
350-
echo ""
351-
install_old_client
352-
;;
353-
*)
354-
log_error "Unknown COMPAT_SCENARIO: $COMPAT_SCENARIO (expected 'old-controller' or 'old-client')"
355-
exit 1
356-
;;
357-
esac
282+
deploy_new_controller
283+
echo ""
284+
285+
install_jumpstarter
286+
echo ""
287+
288+
install_old_client
358289
echo ""
359290

360291
setup_test_environment
361292
echo ""
362293

363294
log_info "=== Compat setup complete! ==="
364-
log_info "Scenario: $COMPAT_SCENARIO"
365-
log_info "To run tests: make e2e-compat-run COMPAT_TEST=<old-controller|old-client>"
295+
log_info "To run tests: make e2e-compat-run COMPAT_TEST=old-client"
366296
}
367297

368298
main "$@"

e2e/compat/tests-old-client.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ setup_file() {
2121
# Verify OLD_JMP is set and exists
2222
if [ -z "$OLD_JMP" ] || [ ! -x "$OLD_JMP" ]; then
2323
echo "ERROR: OLD_JMP not set or not executable: '$OLD_JMP'" >&2
24-
echo "Please run setup.sh with COMPAT_SCENARIO=old-client first." >&2
24+
echo "Please run setup.sh first." >&2
2525
exit 1
2626
fi
2727

0 commit comments

Comments
 (0)