Repository navigation
fix(cloudformation): move task settings into Mappings so they apply on deploy - #418
Conversation
Reduce the Fargate task definition memory default from 4096 MB to 1024 MB. CPU stays at 512 (0.5 vCPU). Observed peak memory is 4.6% of 4 GB (about 190 MB). Closes #417
Roslyn analyzer findings
|
|
Prompt from the repository owner (live chat, verbatim):
Finding: confirmed for this repo. Status: the PR is on hold, not marked ready, while the owner decides how to re-scope it. |
…n deploy The deploy action only passes parameters it has an env value for, so a changed parameter Default never reached the existing stack. Move ECSClusterName, LoadBalancerArn, ContainerPort, TaskDefinitionCPU, TaskDefinitionMemory, TaskRole, DesiredCount, MinimumHealthPercent, MaximumHealthPercent and SecretsManagerArn into a Deployment mapping read with Fn::FindInMap, so every deploy applies the template's values, including the 1 GB task memory. Refs #417
|
Owner confirmed in live chat that the running stack's stored |
Coding ResearcherQuestion: Does the CloudFormation service (not just cfn-lint) accept an empty-string Mappings leaf value ( Outcome:
|
|
Prompt from the repository owner (live chat, verbatim), answering Q7 ("Should #418 remove the dead task-role logic: the
Resolution: routed to Code Fixer as one change on this PR. Behaviour is unchanged, because |
|
Replying to #418 (comment) ("remove it"): Done in the working tree, pending commit: Pattern Sweep: no other reference to |
Deployment.Task.Role was a constant empty string, so HasTaskRole was always false and TaskRoleArn always resolved to AWS::NoValue. Remove the mapping key, the condition and the property; behaviour is unchanged. Refs #417
|
Prompt from the repository owner (live chat, verbatim), answering Q8 ("Should the changelog correction remove the Unreleased W1030 entry about TaskRoleArn, since the property is now gone?"):
Resolution: the Changelog correction step removes "Resolved cfn-lint W1030 warning on the TaskRoleArn CloudFormation property by only setting it when a TaskRole is provided" from Unreleased. |
|
Fixed in 928a720: removed the always-false |
AI Review Loop: Phase B round 1 triage
|
|
Owner confirmed in live chat (verbatim), after checking the stack's Parameters tab in the CloudFormation console:
So |
AI Review Loop: Phase C security review: no findings. The only secret-handling concern (plaintext
|
|
Coverage ratchet passed - advancing to Human Review (bootstrap: no COVERAGE.md on main yet; .NET overall 99.0% on the branch, unchanged). |
AI Review Loop: reviewed 4038765 |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
CI Debugger: build-pre-release failed on 4038765 (run https://github.com/funfair-tech/BuildBot/actions/runs/38380350897), attempt 1 of 3 - routed to CI Debugger for diagnosis. |
CI Debugger: environment/infrastructure block for build-pre-releaseRoot cause: an external NuGet feed, not code in this PR. The Evidence
Fix needed (outside this PR): restore anonymous GET (404 for missing keys) on the Stopping under the CI Debugger environment/infrastructure block convention (the |
|
Owner reported in live chat (verbatim):
Verified: both S3 NuGet feeds ( |
Summary
The deploy action only passes CloudFormation parameters for which it has an environment value. Changing a parameter's
Defaulttherefore never reached the existing stack, so the change was silently ignored on deploy. This is the same cause as issue 3930 in the funfair-treasury-reporting repository.To make the task settings apply on deploy, they now live in a
Deploymentmapping read withFn::FindInMap:ECSClusterName,LoadBalancerArn,ContainerPort,TaskDefinitionCPU,TaskDefinitionMemory,DesiredCount,MinimumHealthPercent,MaximumHealthPercentandSecretsManagerArnmoved into the mapping.Other changes
TaskRolecondition and theTaskRoleArnproperty are removed. This has no behaviour change because the stack's task role is blank.SecurityGroupIDs,SubnetIDs,VpcIDandTaskExecutionRolestay as parameters until issue 1030 in the funfair-server-template repository is synced.COVERAGE.mdis bootstrapped as the coverage ratchet baseline (.NET overall line coverage 99.0%).Closes #417