Skip to content

Commit b7df758

Browse files
committed
[history server][e2e] Fix Azure collector tests to use dynamic namespace
Update Azure collector tests to use namespace.Name instead of hardcoded RayClusterID constant, matching the S3 collector test pattern. This ensures the expected blob path matches the actual upload path when --ray-cluster-id is injected dynamically.
1 parent dc3b44f commit b7df758

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

historyserver/test/e2e/azureblob_collector_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func testAzureBlobUploadOnGracefulShutdown(test Test, g *WithT, namespace *corev
5858

5959
_ = ApplyRayJobAndWaitForCompletion(test, g, namespace, rayCluster)
6060

61-
clusterNameID := fmt.Sprintf("%s_%s", rayCluster.Name, RayClusterID)
61+
clusterNameID := fmt.Sprintf("%s_%s", rayCluster.Name, namespace.Name)
6262
sessionID := GetSessionIDFromHeadPod(test, g, rayCluster)
6363
headNodeID := GetNodeIDFromPod(test, g, HeadPod(test, rayCluster), "ray-head")
6464
workerNodeID := GetNodeIDFromPod(test, g, FirstWorkerPod(test, rayCluster), "ray-worker")
@@ -84,7 +84,7 @@ func testAzureBlobSeparatesFilesBySession(test Test, g *WithT, namespace *corev1
8484

8585
_ = ApplyRayJobAndWaitForCompletion(test, g, namespace, rayCluster)
8686

87-
clusterNameID := fmt.Sprintf("%s_%s", rayCluster.Name, RayClusterID)
87+
clusterNameID := fmt.Sprintf("%s_%s", rayCluster.Name, namespace.Name)
8888
sessionID := GetSessionIDFromHeadPod(test, g, rayCluster)
8989
headNodeID := GetNodeIDFromPod(test, g, HeadPod(test, rayCluster), "ray-head")
9090
workerNodeID := GetNodeIDFromPod(test, g, FirstWorkerPod(test, rayCluster), "ray-worker")
@@ -108,7 +108,7 @@ func testAzureBlobResumesUploadsOnRestart(test Test, g *WithT, namespace *corev1
108108

109109
dummySessionID := fmt.Sprintf("test-recovery-session-%s", namespace.Name)
110110
dummyNodeID := fmt.Sprintf("head-node-%s", namespace.Name)
111-
clusterNameID := fmt.Sprintf("%s_%s", rayCluster.Name, RayClusterID)
111+
clusterNameID := fmt.Sprintf("%s_%s", rayCluster.Name, namespace.Name)
112112
sessionPrefix := fmt.Sprintf("log/%s/%s/", clusterNameID, dummySessionID)
113113

114114
headPod, err := GetHeadPod(test, rayCluster)

historyserver/test/support/raycluster.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ import (
1313
. "github.com/ray-project/kuberay/ray-operator/test/support"
1414
)
1515

16-
const (
17-
RayClusterManifestPath = "../../config/raycluster.yaml"
18-
RayClusterID = "default"
19-
)
16+
const RayClusterManifestPath = "../../config/raycluster.yaml"
2017

2118
// ApplyRayClusterWithCollectorWithEnvs deploys a Ray cluster with the collector sidecar into the test namespace,
2219
// adding the specified environment variables to the head pod.

0 commit comments

Comments
 (0)