Skip to content

Commit

Permalink
Adding hash to pipelines processing step function execution names to …
Browse files Browse the repository at this point in the history
…prevent collisions
  • Loading branch information
avolip authored and StewartW committed Jul 24, 2023
1 parent 8989a29 commit af85438
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def start_executions(
# truncated version concatenated with an hash generated from
# the pipeline name
truncated_pipeline_name = full_pipeline_name[:24]
truncated_pipeline_name_hash = hashlib.md5( bytes(full_pipeline_name, 'utf-8') ).hexdigest()[:5]
sfn_execution_name = f"{truncated_pipeline_name}-{truncated_pipeline_name_hash}-{run_id}"
execution_unique_hash = hashlib.md5( bytes(full_pipeline_name + run_id, 'utf-8') ).hexdigest()[:5]
sfn_execution_name = f"{truncated_pipeline_name}-{execution_unique_hash}-{run_id}"
sfn_client.start_execution(
stateMachineArn=PIPELINE_MANAGEMENT_STATEMACHINE,
name=sfn_execution_name,
Expand Down

0 comments on commit af85438

Please sign in to comment.