navapbc / template-infra

A template to set up foundational infrastructure for your application in AWS
Apache License 2.0
11 stars 2 forks source link

⚠ Removes feature flags #790

Closed coilysiren closed 1 day ago

coilysiren commented 6 days ago

Ticket

Relates to https://github.com/navapbc/template-infra/issues/781

Closes https://github.com/navapbc/template-infra/issues/791

Changes

Testing

https://github.com/navapbc/platform-test/pull/142

coilysiren commented 2 days ago

🤔

2024-11-22T22:57:18.0788120Z                                        template_infra_test.go:123
2024-11-22T22:57:18.0788610Z            Error:          Received unexpected error:
2024-11-22T22:57:18.0789448Z                            error while running command: exit status 2; ╷
2024-11-22T22:57:18.0790562Z                            │ Error: ELBv2 Load Balancer (app-dev) already exists
2024-11-22T22:57:18.0791238Z                            │ 
2024-11-22T22:57:18.0791941Z                            │   with module.service.aws_lb.alb,
2024-11-22T22:57:18.0793350Z                            │   on ../../modules/service/load_balancer.tf line 6, in resource "aws_lb" "alb":
2024-11-22T22:57:18.0794295Z                            │    6: resource "aws_lb" "alb" {
2024-11-22T22:57:18.0794853Z                            │ 
2024-11-22T22:57:18.0795313Z                            ╵
2024-11-22T22:57:18.0795761Z                            ╷
2024-11-22T22:57:18.0799558Z                            │ Error: creating ECS Service (app-dev): operation error ECS: CreateService, https response error StatusCode: 400, RequestID: 4e149bb6-08d1-4da8-850f-784b3518c511, InvalidParameterException: The target group with targetGroupArn arn:aws:elasticloadbalancing:us-east-1:533267424629:targetgroup/app-20241122225307302500000002/2ca5ffc4aeb8a433 does not have an associated load balancer.
2024-11-22T22:57:18.0801740Z                            │ 
2024-11-22T22:57:18.0802522Z                            │   with module.service.aws_ecs_service.app,
2024-11-22T22:57:18.0803672Z                            │   on ../../modules/service/main.tf line 40, in resource "aws_ecs_service" "app":
2024-11-22T22:57:18.0804687Z                            │   40: resource "aws_ecs_service" "app" {
2024-11-22T22:57:18.0805274Z                            │ 
2024-11-22T22:57:18.0805733Z                            ╵
2024-11-22T22:57:18.0806500Z                            make[1]: *** [Makefile:186: infra-update-app-service] Error 1
2024-11-22T22:57:18.0807258Z            Test:           TestEndToEnd/Network/BuildRepository/Service/SetUpDevEnvironment
2024-11-22T22:57:18.0807956Z === RUN   TestEndToEnd/Network/BuildRepository/Service/ValidateDevEnvironment
2024-11-22T22:57:18.0808843Z ##[group]Validating ability to call web service endpoint
2024-11-22T22:57:18.0810138Z TestEndToEnd/Network/BuildRepository/Service/ValidateDevEnvironment 2024-11-22T22:57:18Z logger.go:66: Running command aws with args [ecs wait services-stable --cluster app-dev --services app-dev]
2024-11-22T22:57:18.7256374Z TestEndToEnd/Network/BuildRepository/Service/ValidateDevEnvironment 2024-11-22T22:57:18Z logger.go:66: 
2024-11-22T22:57:18.7258947Z TestEndToEnd/Network/BuildRepository/Service/ValidateDevEnvironment 2024-11-22T22:57:18Z logger.go:66: Waiter ServicesStable failed: Waiter encountered a terminal failure state: For expression "failures[].reason" we matched expected path: "MISSING" at least once
2024-11-22T22:57:18.7923760Z     command.go:33: 
2024-11-22T22:57:18.7924654Z            Error Trace:    command.go:33
2024-11-22T22:57:18.7926004Z                                        template_infra_test.go:181
2024-11-22T22:57:18.7927135Z            Error:          Received unexpected error:
2024-11-22T22:57:18.7928745Z                            error while running command: exit status 255; 
2024-11-22T22:57:18.7931649Z                            Waiter ServicesStable failed: Waiter encountered a terminal failure state: For expression "failures[].reason" we matched expected path: "MISSING" at least once
2024-11-22T22:57:18.7933774Z            Test:           TestEndToEnd/Network/BuildRepository/Servic

...probably unrelated...

coilysiren commented 1 day ago

Interesting error in the latest run:

2024-11-27T21:48:50.6736236Z     command.go:33: 
2024-11-27T21:48:50.6736637Z            Error Trace:    command.go:33
2024-11-27T21:48:50.6737346Z                                        template_infra_test.go:123
2024-11-27T21:48:50.6737900Z            Error:          Received unexpected error:
2024-11-27T21:48:50.6739468Z                            error while running command: exit status 2; ╷
2024-11-27T21:48:50.6742934Z                            │ Error: creating SNS Topic (app-dev-monitoring): operation error SNS: CreateTopic, https response error StatusCode: 400, RequestID: e32ff8fe-03b3-5bb0-873f-a73f96888a99, InvalidParameter: Invalid parameter: Tags Reason: Topic already exists with different tags
2024-11-27T21:48:50.6744487Z                            │ 
2024-11-27T21:48:50.6745356Z                            │   with module.monitoring.aws_sns_topic.this,
2024-11-27T21:48:50.6746638Z                            │   on ../../modules/monitoring/main.tf line 4, in resource "aws_sns_topic" "this":
2024-11-27T21:48:50.6747553Z                            │    4: resource "aws_sns_topic" "this" {
2024-11-27T21:48:50.6748016Z                            │ 
2024-11-27T21:48:50.6748401Z                            ╵
2024-11-27T21:48:50.6748779Z                            ╷
2024-11-27T21:48:50.6751303Z                            │ Error: creating IAM Role (app-dev-task-executor): operation error IAM: CreateRole, https response error StatusCode: 409, RequestID: 1e12ca46-9397-46d5-8df2-a27758163229, EntityAlreadyExists: Role with name app-dev-task-executor already exists.
2024-11-27T21:48:50.6752395Z                            │ 
2024-11-27T21:48:50.6753134Z                            │   with module.service.aws_iam_role.task_executor,
2024-11-27T21:48:50.6754305Z                            │   on ../../modules/service/access_control.tf line 5, in resource "aws_iam_role" "task_executor":
2024-11-27T21:48:50.6755275Z                            │    5: resource "aws_iam_role" "task_executor" {
2024-11-27T21:48:50.6755742Z                            │ 
2024-11-27T21:48:50.6756120Z                            ╵
2024-11-27T21:48:50.6756488Z                            ╷
2024-11-27T21:48:50.6758838Z                            │ Error: creating IAM Role (app-dev-app): operation error IAM: CreateRole, https response error StatusCode: 409, RequestID: 504d7e59-1861-46aa-b0cf-c7e85238a9b5, EntityAlreadyExists: Role with name app-dev-app already exists.
2024-11-27T21:48:50.6760215Z                            │ 
2024-11-27T21:48:50.6760947Z                            │   with module.service.aws_iam_role.app_service,
2024-11-27T21:48:50.6762113Z                            │   on ../../modules/service/access_control.tf line 10, in resource "aws_iam_role" "app_service":
2024-11-27T21:48:50.6763058Z                            │   10: resource "aws_iam_role" "app_service" {
2024-11-27T21:48:50.6763530Z                            │ 
2024-11-27T21:48:50.6763914Z                            ╵
2024-11-27T21:48:50.6764292Z                            ╷
2024-11-27T21:48:50.6767216Z                            │ Error: creating CloudWatch Logs Log Group (service/app-dev): operation error CloudWatch Logs: CreateLogGroup, https response error StatusCode: 400, RequestID: 47835c62-fd36-47e5-8627-b0ec75c9071c, ResourceAlreadyExistsException: The specified log group already exists
2024-11-27T21:48:50.6768435Z                            │ 
2024-11-27T21:48:50.6769276Z                            │   with module.service.aws_cloudwatch_log_group.service_logs,
2024-11-27T21:48:50.6770603Z                            │   on ../../modules/service/application_logs.tf line 6, in resource "aws_cloudwatch_log_group" "service_logs":
2024-11-27T21:48:50.6771722Z                            │    6: resource "aws_cloudwatch_log_group" "service_logs" {
2024-11-27T21:48:50.6772244Z                            │ 
2024-11-27T21:48:50.6772626Z                            ╵
2024-11-27T21:48:50.6773003Z                            ╷
2024-11-27T21:48:50.6775779Z                            │ Error: creating IAM Policy (app-dev-ecs-exec): operation error IAM: CreatePolicy, https response error StatusCode: 409, RequestID: b8cb03e5-6346-444e-af67-5044713eb4cf, EntityAlreadyExists: A policy called app-dev-ecs-exec already exists. Duplicate names are not allowed.
2024-11-27T21:48:50.6776980Z                            │ 
2024-11-27T21:48:50.6777696Z                            │   with module.service.aws_iam_policy.ecs_exec,
2024-11-27T21:48:50.6779183Z                            │   on ../../modules/service/command_execution.tf line 5, in resource "aws_iam_policy" "ecs_exec":
2024-11-27T21:48:50.6780165Z                            │    5: resource "aws_iam_policy" "ecs_exec" {
2024-11-27T21:48:50.6780642Z                            │