Skip to content

Commit

Permalink
fixup! Fix: Race between layer and Lambda update (#5927)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Sep 11, 2024
1 parent fa91f1e commit f612650
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/azul/lambdas.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ def reset_lambda_roles(self):

def delete_published_function_versions(self):
"""
Delete all but the latest published version of every AWS Lambda function
in the current deployment.
Delete the published versions of every AWS Lambda function in the
current deployment.
"""
log.info('Deleting stale versions of AWS Lambda functions')
for function in self.list_lambdas(deployment=config.deployment_stage,
all_versions=True):
if function.version == '$LATEST':
log.info('Skipping latest version %r', function.name)
log.info('Skipping the unpublished version of %r', function.name)
else:
log.info('Deleting version %r of %r', function.version, function.name)
log.info('Deleting published version %r of %r', function.version, function.name)
self._lambda.delete_function(FunctionName=function.name,
Qualifier=function.version)

0 comments on commit f612650

Please sign in to comment.