Skip to content

Commit

Permalink
Add comments to better explain logic in clusters_factory.py
Browse files Browse the repository at this point in the history
Signed-off-by: Jacopo De Amicis <[email protected]>
  • Loading branch information
jdeamicis committed Apr 17, 2023
1 parent 7ae439c commit 0c1692b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration-tests/clusters_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def update(self, config_file, raise_on_error=True, log_error=True, **kwargs):
# update the cluster
logging.info("Updating cluster %s with config %s", self.name, config_file)
command = ["pcluster", "update-cluster", "--cluster-configuration", config_file, "--cluster-name", self.name]
# This changes the default behavior of the update-cluster command and makes it wait for the cluster update to
# finish before returning.
if kwargs.pop("wait", True):
command.append("--wait")
for k, val in kwargs.items():
Expand Down Expand Up @@ -479,6 +481,8 @@ def _build_command(cluster, kwargs):
cluster.name,
]

# This changes the default behavior of the create-cluster command and makes it wait for the cluster creation to
# finish before returning.
wait = kwargs.pop("wait", True)
if wait:
command.append("--wait")
Expand Down

0 comments on commit 0c1692b

Please sign in to comment.