Skip to content

Commit ae66c10

Browse files
committed
RHOAIENG-36285: ignore ns exists and increase resources
1 parent 973d320 commit ae66c10

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

tests/e2e/support.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import random
33
import string
44
import subprocess
5+
import warnings
56
from codeflare_sdk import get_cluster
67
from kubernetes import client, config
78
from codeflare_sdk.common.kubernetes_cluster.kube_api_helpers import (
@@ -116,6 +117,12 @@ def create_namespace_with_name(self, namespace_name):
116117
metadata=client.V1ObjectMeta(name=self.namespace)
117118
)
118119
self.api_instance.create_namespace(namespace_body)
120+
except client.ApiException as e:
121+
if e.status == 409: # Conflict - namespace already exists
122+
warnings.warn(f"Namespace '{namespace_name}' already exists.", UserWarning)
123+
return None # Return None to indicate successful handling with warning
124+
else:
125+
return _kube_api_error_handling(e)
119126
except Exception as e:
120127
return _kube_api_error_handling(e)
121128

tests/upgrade/raycluster_sdk_upgrade_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ def run_mnist_raycluster_sdk_oauth(self):
5050
num_workers=1,
5151
head_cpu_requests=1,
5252
head_cpu_limits=1,
53-
head_memory_requests=4,
54-
head_memory_limits=4,
53+
head_memory_requests=6,
54+
head_memory_limits=8,
5555
worker_cpu_requests=1,
5656
worker_cpu_limits=1,
57-
worker_memory_requests=4,
58-
worker_memory_limits=4,
57+
worker_memory_requests=8,
58+
worker_memory_limits=8,
5959
image=ray_image,
6060
write_to_file=True,
6161
verify_tls=False,

0 commit comments

Comments
 (0)