Skip to content

Commit

Permalink
Review changes local_interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbins228 authored and openshift-merge-bot[bot] committed Mar 28, 2024
1 parent ef8e94b commit 62519b2
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/codeflare_sdk/cluster/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def from_k8_cluster_object(
openshift_oauth = False
if (
rc["metadata"]["annotations"]["sdk.codeflare.dev/local_interactive"]
== "true"
== "True"
):
local_interactive = True
else:
Expand Down Expand Up @@ -677,7 +677,7 @@ def get_cluster(
mcad = _check_aw_exists(cluster_name, namespace)
ingress_host = None
ingress_options = {}
if is_openshift_cluster() == False:
if not is_openshift_cluster():
try:
config_check()
api_instance = client.NetworkingV1Api(api_config_handler())
Expand Down
2 changes: 1 addition & 1 deletion src/codeflare_sdk/templates/base-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
kind: RayCluster
metadata:
annotations:
sdk.codeflare.dev/local_interactive: "false"
sdk.codeflare.dev/local_interactive: "False"
labels:
workload.codeflare.dev/appwrapper: "aw-kuberay"
controller-tools.k8s.io: "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/codeflare_sdk/utils/generate_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def enable_local_interactive(resources, cluster_name, namespace, ingress_domain)
)
item["generictemplate"]["metadata"]["annotations"][
"sdk.codeflare.dev/local_interactive"
] = "true"
] = "True"
item["generictemplate"]["metadata"]["annotations"][
"sdk.codeflare.dev/ingress_domain"
] = ingress_domain
Expand Down
2 changes: 1 addition & 1 deletion tests/test-case-bad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
kind: RayCluster
metadata:
annotations:
sdk.codeflare.dev/local_interactive: 'false'
sdk.codeflare.dev/local_interactive: 'False'
labels:
workload.codeflare.dev/appwrapper: unit-test-cluster
controller-tools.k8s.io: '1.0'
Expand Down
2 changes: 1 addition & 1 deletion tests/test-case-no-mcad.yamls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: RayCluster
metadata:
annotations:
sdk.codeflare.dev/ingress_domain: apps.cluster.awsroute.org
sdk.codeflare.dev/local_interactive: 'false'
sdk.codeflare.dev/local_interactive: 'False'
labels:
controller-tools.k8s.io: '1.0'
workload.codeflare.dev/appwrapper: unit-test-cluster-ray
Expand Down
2 changes: 1 addition & 1 deletion tests/test-case-prio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
metadata:
annotations:
sdk.codeflare.dev/ingress_domain: apps.cluster.awsroute.org
sdk.codeflare.dev/local_interactive: 'false'
sdk.codeflare.dev/local_interactive: 'False'
labels:
controller-tools.k8s.io: '1.0'
workload.codeflare.dev/appwrapper: prio-test-cluster
Expand Down
2 changes: 1 addition & 1 deletion tests/test-case.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
metadata:
annotations:
sdk.codeflare.dev/ingress_domain: apps.cluster.awsroute.org
sdk.codeflare.dev/local_interactive: 'false'
sdk.codeflare.dev/local_interactive: 'False'
labels:
controller-tools.k8s.io: '1.0'
workload.codeflare.dev/appwrapper: unit-test-cluster
Expand Down
2 changes: 1 addition & 1 deletion tests/test-default-appwrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
metadata:
annotations:
sdk.codeflare.dev/ingress_domain: apps.cluster.awsroute.org
sdk.codeflare.dev/local_interactive: 'false'
sdk.codeflare.dev/local_interactive: 'False'
labels:
controller-tools.k8s.io: '1.0'
workload.codeflare.dev/appwrapper: unit-test-default-cluster
Expand Down
8 changes: 4 additions & 4 deletions tests/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ def get_ray_obj(group, version, namespace, plural, cls=None):
"creationTimestamp": "2024-03-05T09:55:37Z",
"generation": 1,
"annotations": {
"sdk.codeflare.dev/local_interactive": "true",
"sdk.codeflare.dev/local_interactive": "True",
"sdk.codeflare.dev/ingress_domain": "apps.cluster.awsroute.org",
},
"labels": {
Expand Down Expand Up @@ -1535,7 +1535,7 @@ def get_aw_obj(group, version, namespace, plural):
"kind": "RayCluster",
"metadata": {
"annotations": {
"sdk.codeflare.dev/local_interactive": "false"
"sdk.codeflare.dev/local_interactive": "False"
},
"labels": {
"workload.codeflare.dev/appwrapper": "quicktest1",
Expand Down Expand Up @@ -1866,7 +1866,7 @@ def get_aw_obj(group, version, namespace, plural):
"kind": "RayCluster",
"metadata": {
"annotations": {
"sdk.codeflare.dev/local_interactive": "false"
"sdk.codeflare.dev/local_interactive": "False"
},
"labels": {
"workload.codeflare.dev/appwrapper": "quicktest2",
Expand Down Expand Up @@ -2138,7 +2138,7 @@ def test_get_cluster_openshift(mocker):
]
mocker.patch("kubernetes.client.ApisApi", return_value=mock_api)

assert is_openshift_cluster() == True
assert is_openshift_cluster()

def custom_side_effect(group, version, namespace, plural, **kwargs):
if plural == "routes":
Expand Down

0 comments on commit 62519b2

Please sign in to comment.