-
Notifications
You must be signed in to change notification settings - Fork 698
[history server][e2e] Add Azure Blob Storage E2E test for History Server #4460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ikchifo
wants to merge
10
commits into
ray-project:master
Choose a base branch
from
ikchifo:feature/azure-historyserver-e2e
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b54792a
[history server][config] Add Azure Blob Storage deployment manifest
ikchifo 28ac4e9
[history server][e2e] Add Azure History Server support functions
ikchifo f3728a1
[history server][e2e] Add Azure Blob Storage E2E test for History Server
ikchifo 62e9f86
[history server][docs] Add historyserver-azureblob.yaml to config fil…
ikchifo 058506b
[history server][e2e] Remove duplicate test support functions
ikchifo d7554c1
Merge branch 'master' into feature/azure-historyserver-e2e
ikchifo d2de310
fix merge conflict
Future-Outlier d336ac1
[history server][e2e] Add dead cluster tests for Azure Blob Storage
ikchifo dc3b44f
[history server][e2e] Fix Azure dead cluster tests by injecting ray-c…
ikchifo b7df758
[history server][e2e] Fix Azure collector tests to use dynamic namespace
ikchifo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: historyserver | ||
| labels: | ||
| app: historyserver | ||
| spec: | ||
| selector: | ||
| app: historyserver | ||
| ports: | ||
| - protocol: TCP | ||
| name: http | ||
| port: 30080 | ||
| targetPort: 8080 | ||
| type: ClusterIP | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: historyserver-demo | ||
| labels: | ||
| app: historyserver | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: historyserver | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: historyserver | ||
| spec: | ||
| serviceAccountName: historyserver | ||
| containers: | ||
| - name: historyserver | ||
| env: | ||
| - name: AZURE_STORAGE_CONNECTION_STRING | ||
| value: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite-service.azurite-dev.svc.cluster.local:10000/devstoreaccount1;" | ||
| - name: AZURE_STORAGE_CONTAINER | ||
| value: "ray-historyserver" | ||
| image: historyserver:v0.1.0 | ||
| imagePullPolicy: IfNotPresent | ||
| command: | ||
| - historyserver | ||
| - --runtime-class-name=azureblob | ||
| - --ray-root-dir=log | ||
| ports: | ||
| - containerPort: 8080 | ||
| resources: | ||
| limits: | ||
| cpu: "500m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| package e2e | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" | ||
| . "github.com/onsi/gomega" | ||
| corev1 "k8s.io/api/core/v1" | ||
|
|
||
| . "github.com/ray-project/kuberay/historyserver/test/support" | ||
| . "github.com/ray-project/kuberay/ray-operator/test/support" | ||
| ) | ||
|
|
||
| func TestAzureHistoryServer(t *testing.T) { | ||
| azureClient := EnsureAzureBlobClient(t) | ||
|
|
||
| tests := []struct { | ||
| name string | ||
| testFunc func(Test, *WithT, *corev1.Namespace, *azblob.Client) | ||
| }{ | ||
| { | ||
| name: "Live cluster: historyserver endpoints should be accessible", | ||
| testFunc: testAzureLiveClusters, | ||
| }, | ||
| } | ||
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.name, func(t *testing.T) { | ||
| test := With(t) | ||
| g := NewWithT(t) | ||
| namespace := test.NewTestNamespace() | ||
|
|
||
| tt.testFunc(test, g, namespace, azureClient) | ||
| }) | ||
| } | ||
| } | ||
|
|
||
| func testAzureLiveClusters(test Test, g *WithT, namespace *corev1.Namespace, azureClient *azblob.Client) { | ||
| rayCluster := PrepareAzureHistoryServerTestEnv(test, g, namespace, azureClient) | ||
| ApplyRayJobAndWaitForCompletion(test, g, namespace, rayCluster) | ||
| ApplyAzureHistoryServer(test, g, namespace) | ||
| historyServerURL := GetHistoryServerURL(test, g, namespace) | ||
|
|
||
| clusterInfo := getClusterFromList(test, g, historyServerURL, rayCluster.Name, namespace.Name) | ||
| g.Expect(clusterInfo.SessionName).To(Equal(LiveSessionName), "Live cluster should have sessionName='live'") | ||
|
|
||
| client := CreateHTTPClientWithCookieJar(g) | ||
| setClusterContext(test, g, client, historyServerURL, namespace.Name, rayCluster.Name, clusterInfo.SessionName) | ||
| verifyHistoryServerEndpoints(test, g, client, historyServerURL) | ||
|
|
||
| DeleteAzureBlobContainer(test, g, azureClient) | ||
| LogWithTimestamp(test.T(), "Azure live clusters E2E test completed successfully") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.