Skip to content

Commit

Permalink
Convert generator to a list for YAML processing
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianZaccaria authored and openshift-merge-bot[bot] committed Apr 16, 2024
1 parent 6557465 commit a53fc1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/codeflare_sdk/cluster/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def _component_resources_up(
):
if self.config.write_to_file:
with open(self.app_wrapper_yaml) as f:
yamls = yaml.load_all(f, Loader=yaml.FullLoader)
yamls = list(yaml.load_all(f, Loader=yaml.FullLoader))
for resource in yamls:
enable_ingress = (
resource.get("spec", {})
Expand All @@ -559,8 +559,6 @@ def _component_resources_up(
f"Forbidden: RayCluster '{name}' has 'enableIngress' set to 'True' or is unset."
)
return
f.seek(0) # Reset file pointer to the beginning
yamls = yaml.load_all(f, Loader=yaml.FullLoader) # Reload the YAMLs
_create_resources(yamls, namespace, api_instance)
else:
yamls = yaml.load_all(self.app_wrapper_yaml, Loader=yaml.FullLoader)
Expand Down

0 comments on commit a53fc1e

Please sign in to comment.