Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give cluster info if failing to add steps + publish 0.11.6 #113

Merged
merged 3 commits into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions yaetos/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ def run_direct(self):
self.start_spark_cluster(c, self.emr_version)
logger.info("cluster name: %s, and id: %s" % (self.pipeline_name, self.cluster_id))
self.step_run_setup_scripts(c)
try:
self.step_run_setup_scripts(c)
except botocore.exceptions.ClientError as e:
self.describe_status(c)
logger.error(f"botocore.exceptions.ClientError : {e}")
raise
else:
logger.info("Reusing existing cluster, name: %s, and id: %s" % (cluster['name'], cluster['id']))
self.cluster_id = cluster['id']
Expand Down Expand Up @@ -456,6 +462,10 @@ def describe_status_until_terminated(self, c):
logger.info('Cluster state:' + state)
time.sleep(30) # Prevent ThrottlingException by limiting number of requests

def describe_status(self, c):
description = c.describe_cluster(ClusterId=self.cluster_id)
logger.info(f'Cluster description: {description}')

def step_run_setup_scripts(self, c):
"""
:param c:
Expand Down
Loading