Skip to content

Commit

Permalink
minor logging fixes (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
VoicuAWS authored Feb 27, 2025
1 parent 077e97b commit d366374
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cid/helpers/cur.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def find_cur(self):
try:
metadata = self.athena.get_table_metadata(table_name, cur_database)
except self.athena.client.exceptions.MetadataException as exc:
raise CidCritical(f'Provided cur-table-name "{table_name}" in database "{cur_database or self.athena.DatabaseName}" is not found. Please make sure the table exists.') from exc
raise CidCritical(f'Provided cur-table-name "{table_name}" in database "{cur_database or self.athena.DatabaseName}" is not found. Please make sure the table exists. This could also indicate a LakeFormation permission issue, see our FAQ for help.') from exc
res, message = self.table_is_cur(table=metadata, return_reason=True)
if not res:
raise CidCritical(f'Table {table_name} does not look like CUR. {message}')
Expand Down
2 changes: 1 addition & 1 deletion cid/helpers/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def create_or_update_crawler(self, crawler_definition) -> None:
self.client.update_crawler(**crawler_definition)
except self.client.exceptions.ClientError as exc:
if 'Service is unable to assume provided role' in str(exc):
logger.info('attempt{attempt}: Retrying ') # sometimes newly created roles cannot be assumed right away
logger.info(f'attempt{attempt}: Retrying ') # sometimes newly created roles cannot be assumed right away
time.sleep(3)
continue
logger.error(crawler_definition)
Expand Down
2 changes: 1 addition & 1 deletion cid/helpers/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def ensure_managed_policies_attached(self, role_name, policies_arns='') -> None:
RoleName=role_name,
PolicyArn=policy_arn,
)
logger.info('Attached {policy_arn} to the role {role_name}')
logger.info(f'Attached {policy_arn} to the role {role_name}')
except self.client.exceptions.ClientError as exc:
logger.warning(f'Unable to attach policy {policy_arn} to {role_name}: {exc}')

Expand Down

0 comments on commit d366374

Please sign in to comment.