From ad0ccd1ca8d3fcc7b4184d76a964514a3b273107 Mon Sep 17 00:00:00 2001 From: "Mengyi Zhou (bjrara)" Date: Fri, 17 Jan 2025 10:43:24 -0800 Subject: [PATCH] Add container dependencies to the ECS canaries (#359) *Issue description:* ECS canaries failed intermittently due to incorrect container start sequence. *Description of changes:* Add container dependencies to the default app container to wait until init container to complete and cwa container to start. *Rollback procedure:* *Ensure you've run the following tests on your changes and include the link below:* To do so, create a `test.yml` file with `name: Test` and workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing. NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the [needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds) keyword to run tests in succession. - Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and eu-central-2 - Run EC2 tests in all regions - Run K8s on a separate K8s cluster (check IAD test account for master node endpoints; these will change as we create and destroy clusters for OS patching) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --- .../java/ecs/resources/main-service.json.tpl | 18 ++++++++++++++---- .../python/ecs/resources/main-service.json.tpl | 10 ++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/terraform/java/ecs/resources/main-service.json.tpl b/terraform/java/ecs/resources/main-service.json.tpl index 858f66bbd..125947ea6 100644 --- a/terraform/java/ecs/resources/main-service.json.tpl +++ b/terraform/java/ecs/resources/main-service.json.tpl @@ -54,10 +54,10 @@ "name": "OTEL_PROPAGATORS", "value": "tracecontext,baggage,b3,xray" }, - { - "name": "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED", - "value": "true" - } + { + "name": "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED", + "value": "true" + } ], "mountPoints": [ { @@ -66,6 +66,16 @@ "readOnly": false } ], + "dependsOn": [ + { + "containerName": "init", + "condition": "SUCCESS" + }, + { + "containerName": "ecs-cwagent", + "condition": "START" + } + ], "logConfiguration": { "logDriver": "awslogs", "options": { diff --git a/terraform/python/ecs/resources/main-service.json.tpl b/terraform/python/ecs/resources/main-service.json.tpl index 9f820fb6e..baf5b078a 100644 --- a/terraform/python/ecs/resources/main-service.json.tpl +++ b/terraform/python/ecs/resources/main-service.json.tpl @@ -79,6 +79,16 @@ "readOnly": false } ], + "dependsOn": [ + { + "containerName": "init", + "condition": "SUCCESS" + }, + { + "containerName": "ecs-cwagent", + "condition": "START" + } + ], "logConfiguration": { "logDriver": "awslogs", "options": {