Open k2nr opened 2 years ago
Before barcelona deploys a new version, it checks statuses of all stacks (for services) https://github.com/degica/barcelona/blob/1b94dbb45e14fdcab662d9ec9165fa6ec7461a12/app/jobs/deploy_runner_job.rb#L46
While it is necessary to check it, calling DescribeStacks for each service is unnecessary because DescribeStacks returns all stacks if StackName is not specified https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeStacks.html
DescribeStacks
StackName
We can optimize that line so that barcelona calls DescribeStacks only once per deployment
Before barcelona deploys a new version, it checks statuses of all stacks (for services) https://github.com/degica/barcelona/blob/1b94dbb45e14fdcab662d9ec9165fa6ec7461a12/app/jobs/deploy_runner_job.rb#L46
While it is necessary to check it, calling
DescribeStacks
for each service is unnecessary becauseDescribeStacks
returns all stacks ifStackName
is not specified https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeStacks.htmlWe can optimize that line so that barcelona calls
DescribeStacks
only once per deployment