Skip to content

Commit a53fc1e

Browse files
Convert generator to a list for YAML processing
1 parent 6557465 commit a53fc1e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: src/codeflare_sdk/cluster/cluster.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def _component_resources_up(
546546
):
547547
if self.config.write_to_file:
548548
with open(self.app_wrapper_yaml) as f:
549-
yamls = yaml.load_all(f, Loader=yaml.FullLoader)
549+
yamls = list(yaml.load_all(f, Loader=yaml.FullLoader))
550550
for resource in yamls:
551551
enable_ingress = (
552552
resource.get("spec", {})
@@ -559,8 +559,6 @@ def _component_resources_up(
559559
f"Forbidden: RayCluster '{name}' has 'enableIngress' set to 'True' or is unset."
560560
)
561561
return
562-
f.seek(0) # Reset file pointer to the beginning
563-
yamls = yaml.load_all(f, Loader=yaml.FullLoader) # Reload the YAMLs
564562
_create_resources(yamls, namespace, api_instance)
565563
else:
566564
yamls = yaml.load_all(self.app_wrapper_yaml, Loader=yaml.FullLoader)

0 commit comments

Comments
 (0)