Skip to content

Commit ba56307

Browse files
committed
test: revert e2e workflow
1 parent 40c3449 commit ba56307

File tree

4 files changed

+21
-40
lines changed

4 files changed

+21
-40
lines changed

.github/workflows/e2e_tests.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
pull_request:
66
branches:
77
- main
8-
- 'release-*'
8+
- "release-*"
99
- ray-jobs-feature
1010
paths-ignore:
11-
- 'docs/**'
12-
- '**.adoc'
13-
- '**.md'
14-
- 'LICENSE'
11+
- "docs/**"
12+
- "**.adoc"
13+
- "**.md"
14+
- "LICENSE"
1515

1616
concurrency:
1717
group: ${{ github.head_ref }}-${{ github.workflow }}
@@ -33,9 +33,9 @@ jobs:
3333
- name: Checkout common repo code
3434
uses: actions/checkout@v4
3535
with:
36-
repository: 'project-codeflare/codeflare-common'
37-
ref: 'main'
38-
path: 'common'
36+
repository: "project-codeflare/codeflare-common"
37+
ref: "main"
38+
path: "common"
3939

4040
- name: Checkout CodeFlare operator repository
4141
uses: actions/checkout@v4
@@ -46,7 +46,7 @@ jobs:
4646
- name: Set Go
4747
uses: actions/setup-go@v5
4848
with:
49-
go-version-file: './codeflare-operator/go.mod'
49+
go-version-file: "./codeflare-operator/go.mod"
5050
cache-dependency-path: "./codeflare-operator/go.sum"
5151

5252
- name: Set up gotestfmt
@@ -57,8 +57,8 @@ jobs:
5757
- name: Set up specific Python version
5858
uses: actions/setup-python@v5
5959
with:
60-
python-version: '3.11'
61-
cache: 'pip' # caching pip dependencies
60+
python-version: "3.11"
61+
cache: "pip" # caching pip dependencies
6262

6363
- name: Setup NVidia GPU environment for KinD
6464
uses: ./common/github-actions/nvidia-gpu-setup
@@ -146,7 +146,7 @@ jobs:
146146
if: always() && steps.deploy.outcome == 'success'
147147
run: |
148148
echo "Printing KubeRay operator logs"
149-
kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${CODEFLARE_TEST_OUTPUT_DIR}/kuberay.log
149+
kubectl logs -n default --tail -1 -l app.kubernetes.io/name=kuberay | tee ${CODEFLARE_TEST_OUTPUT_DIR}/kuberay.log
150150
151151
- name: Export all KinD pod logs
152152
uses: ./common/github-actions/kind-export-logs

src/codeflare_sdk/ray/cluster/cluster.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ def is_dashboard_ready(self) -> bool:
391391
bool:
392392
True if the dashboard is ready, False otherwise.
393393
"""
394+
394395
dashboard_uri = self.cluster_dashboard_uri()
395396
if dashboard_uri is None:
396397
return False
@@ -516,6 +517,8 @@ def cluster_dashboard_uri(self) -> str:
516517
):
517518
protocol = "https" if route["spec"].get("tls") else "http"
518519
return f"{protocol}://{route['spec']['host']}"
520+
# No route found for this cluster
521+
return "Dashboard not available yet, have you run cluster.up()?"
519522
else:
520523
try:
521524
api_instance = client.NetworkingV1Api(get_api_client())
@@ -534,25 +537,9 @@ def cluster_dashboard_uri(self) -> str:
534537
protocol = "http"
535538
elif "route.openshift.io/termination" in annotations:
536539
protocol = "https"
537-
return f"{protocol}://{ingress.spec.rules[0].host}"
540+
return f"{protocol}://{ingress.spec.rules[0].host}"
538541

539-
# For local/test environments without ingress controller (e.g., KIND)
540-
# Try to find the Ray head service
541-
try:
542-
api_instance = client.CoreV1Api(get_api_client())
543-
services = api_instance.list_namespaced_service(
544-
self.config.namespace,
545-
label_selector=f"ray.io/cluster={self.config.name},ray.io/node-type=head",
546-
)
547-
for service in services.items:
548-
if service.metadata.name == f"{self.config.name}-head-svc":
549-
# For ClusterIP services in local environments, return a placeholder
550-
# The actual connection would need port-forwarding or NodePort
551-
return f"http://{service.metadata.name}.{self.config.namespace}.svc.cluster.local:8265"
552-
except Exception: # pragma: no cover
553-
pass
554-
555-
return None
542+
return "Dashboard not available yet, have you run cluster.up()?"
556543

557544
def list_jobs(self) -> List:
558545
"""
@@ -813,11 +800,6 @@ def remove_autogenerated_fields(resource):
813800
else:
814801
remove_autogenerated_fields(resource[key])
815802

816-
# After cleaning, remove empty metadata sections
817-
if "metadata" in resource and isinstance(resource["metadata"], dict):
818-
if len(resource["metadata"]) == 0:
819-
del resource["metadata"]
820-
821803
elif isinstance(resource, list):
822804
for item in resource:
823805
remove_autogenerated_fields(item)

src/codeflare_sdk/ray/cluster/test_cluster.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,10 @@ def test_cluster_uris(mocker):
322322
mocker.patch(
323323
"kubernetes.client.NetworkingV1Api.list_namespaced_ingress",
324324
)
325-
# When no ingress/route/service is found, the method should return None
326-
assert cluster.cluster_dashboard_uri() is None
325+
assert (
326+
cluster.cluster_dashboard_uri()
327+
== "Dashboard not available yet, have you run cluster.up()?"
328+
)
327329

328330
mocker.patch(
329331
"codeflare_sdk.ray.cluster.cluster._is_openshift_cluster", return_value=True

tests/e2e/support.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,6 @@ def create_kueue_resources(
383383

384384

385385
def delete_kueue_resources(self):
386-
# Delete if given cluster-queue exists
387-
if not hasattr(self, "cluster_queues"):
388-
return
389386
for cq in self.cluster_queues:
390387
try:
391388
self.custom_api.delete_cluster_custom_object(

0 commit comments

Comments
 (0)