Skip to content

Commit b0c7f9f

Browse files
committed
test case issue resolved
1 parent a11c64c commit b0c7f9f

File tree

2 files changed

+39
-31
lines changed

2 files changed

+39
-31
lines changed

.github/ct.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,25 @@ validate-yaml: true
2424
helm-extra-args: --timeout 300s --wait --debug
2525

2626
# Helm extra set args for testing
27-
helm-extra-set-args: --set=jobset.install=true --set=replicaCount=1 --set=image.pullPolicy=IfNotPresent
27+
# Note: jobset.install=false because we install JobSet manually
28+
helm-extra-set-args: --set=jobset.install=false --set=replicaCount=1 --set=image.pullPolicy=IfNotPresent
2829

2930
# Default namespace for chart installations
3031
namespace: kubeflow-system
3132

32-
# Additional commands to run for each chart
33-
additional-commands:
34-
- helm dependency update {{ .Path }}
35-
- helm template {{ .Path }} --debug --namespace kubeflow-system --dry-run
36-
- helm lint {{ .Path }}
37-
3833
# Debug settings
3934
debug: true
4035

4136
# Skip cleanup after testing (useful for debugging)
4237
skip-clean-up: false
4338

4439
# Test upgrades (install chart, then upgrade)
45-
upgrade: true
40+
upgrade: false
4641

4742
# Print config for debugging
4843
print-config: true
4944

50-
# Helm dependency build before testing
45+
# Skip dependency build since we handle JobSet manually
5146
helm-dependency-extra-args: --skip-refresh
5247

5348
# Test configuration

.github/workflows/test-helm.yaml

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
- name: Set up chart-testing
3232
uses: helm/[email protected]
3333

34-
- name: Add chart dependencies
35-
run: |
36-
# Add JobSet repository as mentioned in the original PR
37-
helm repo add jobset https://kubernetes-sigs.github.io/jobset
38-
helm repo update
34+
- name: Set up Kind
35+
uses: helm/[email protected]
36+
with:
37+
cluster_name: chart-testing
38+
wait: 300s
3939

4040
- name: Determine target branch
4141
id: get_branch
@@ -59,24 +59,37 @@ jobs:
5959
echo "No generate target found, continuing..."
6060
fi
6161
62-
- name: Create kind cluster
62+
- name: Run chart-testing (lint)
63+
env:
64+
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}
6365
run: |
64-
# Follow the pattern from original PR
65-
if make help 2>/dev/null | grep -q "test-e2e-setup-cluster"; then
66-
echo "Using project's cluster setup..."
67-
make test-e2e-setup-cluster
68-
else
69-
echo "Setting up Kind cluster..."
70-
kind create cluster --name chart-testing --wait 300s
71-
kubectl cluster-info --context kind-chart-testing
72-
fi
66+
# First run linting only
67+
ct lint \
68+
--config .github/ct.yaml \
69+
--target-branch $BRANCH \
70+
--debug
71+
72+
- name: Install JobSet dependency manually
73+
run: |
74+
# Since JobSet uses OCI registry, we need to install it manually
75+
# Use the latest stable version
76+
JOBSET_VERSION="v0.8.1"
77+
helm install jobset oci://registry.k8s.io/jobset/charts/jobset \
78+
--version $JOBSET_VERSION \
79+
--create-namespace \
80+
--namespace=jobset-system \
81+
--wait \
82+
--timeout=300s
83+
84+
echo "JobSet installed successfully"
85+
kubectl get pods -n jobset-system
7386
74-
- name: Run chart-testing (lint and install)
87+
- name: Run chart-testing (install)
7588
env:
7689
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}
7790
run: |
78-
# Use the combined command with configuration file
79-
ct lint-and-install \
91+
# Now install our charts
92+
ct install \
8093
--config .github/ct.yaml \
8194
--target-branch $BRANCH \
8295
--debug
@@ -97,8 +110,7 @@ jobs:
97110
-l app.kubernetes.io/name=kubeflow-trainer || true
98111
99112
echo "=== JobSet Pods ==="
100-
kubectl get pods -n kubeflow-system \
101-
-l app.kubernetes.io/name=jobset || true
113+
kubectl get pods -n jobset-system || true
102114
103115
echo "=== Services ==="
104116
kubectl get svc --all-namespaces
@@ -118,7 +130,7 @@ jobs:
118130
--create-namespace \
119131
--wait \
120132
--timeout 300s \
121-
--set jobset.install=true \
133+
--set jobset.install=false \
122134
--dry-run
123135
124136
echo "Chart validation successful!"
@@ -129,4 +141,5 @@ jobs:
129141
echo "Cleaning up resources..."
130142
kubectl delete namespace kubeflow-system \
131143
--ignore-not-found=true || true
132-
kind delete cluster --name chart-testing || true
144+
kubectl delete namespace jobset-system \
145+
--ignore-not-found=true || true

0 commit comments

Comments
 (0)