Skip to content

Separate worker stacks and lock functions to one stack#353

Merged
twelch merged 8 commits intodevfrom
workerStacks
Sep 25, 2024
Merged

Separate worker stacks and lock functions to one stack#353
twelch merged 8 commits intodevfrom
workerStacks

Conversation

@twelch
Copy link
Copy Markdown
Contributor

@twelch twelch commented Sep 24, 2024

This PR solves two issues:

  • it solves the circular dependency issue in a better way. Instead of keeping worker lambdas in the same stack as their parent, it puts all workder lambdas instead into separate LambdaStacks, so you have two sets of stacks. This better supports more advanced use cases like two gp functions both using the same worker. When new functions get added to a project, they will fill out existing stacks before creating new ones.
  • it locks gp functions to the first stack they get deployed to. This prevents deploy errors when functions move from one stack to another and CloudFormation isn't smart enough to delete the other Lambda first and claims a duplicate resource (because fixed lambdas ID). stack assignments are maintained between deploys in CfnOutput.

@twelch twelch changed the title Worker stacks Support separate worker LambdaStack and lock lambdas to one stack Sep 25, 2024
@twelch twelch changed the title Support separate worker LambdaStack and lock lambdas to one stack Add separate worker LambdaStack and lock functions to one stack Sep 25, 2024
@twelch twelch marked this pull request as ready for review September 25, 2024 17:54
@twelch twelch merged commit b9b2447 into dev Sep 25, 2024
@twelch twelch deleted the workerStacks branch September 25, 2024 18:02
@twelch twelch changed the title Add separate worker LambdaStack and lock functions to one stack Separate worker stacks and lock functions to one stack Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant