From 8059cdce2b266406ac51a1c3a3646f799f57dd93 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Tue, 3 Dec 2024 23:30:18 -0500 Subject: [PATCH 01/13] Implement Bypass Test Mechanism for Emergent Release --- .github/workflows/build-and-upload-release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 38fc1ecce..35fc59b20 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -18,6 +18,11 @@ on: required: false default: false type: boolean + bypass-e2e-test: + description: "Bypass E2E Test" + required: false + default: false + type: boolean tag: description: 'Staging Artifact Tag' required: false @@ -30,6 +35,11 @@ on: required: false default: false type: boolean + bypass-e2e-test: + description: "Bypass E2E Test" + required: false + default: false + type: boolean tag: description: 'Staging Artifact Tag' required: false @@ -135,6 +145,7 @@ jobs: platforms: linux/amd64, linux/arm64 e2e-test: + if: ${{ !inputs.bypass-e2e-test }} name: "Application Signals E2E Test" needs: [MakeBinary] uses: ./.github/workflows/application-signals-e2e-test.yml @@ -147,7 +158,7 @@ jobs: push-release-ecr: if: ${{ inputs.release }} - needs: e2e-test + needs: [MakeTABinary, e2e-test] permissions: id-token: write contents: read From 60160d6fb22da0c04eb9b92ecb33db53c63a4c04 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Tue, 3 Dec 2024 23:33:52 -0500 Subject: [PATCH 02/13] Add spacing. --- .github/workflows/build-and-upload-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 35fc59b20..5595f0fbe 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -134,6 +134,7 @@ jobs: go mod download export GOARCH=arm64 && make targetallocator export GOARCH=amd64 && make targetallocator + - name: Build Cloudwatch Agent Target Allocator Image and push to ECR uses: docker/build-push-action@v4 if: steps.cached_binaries.outputs.cache-hit == false From c94b6f132f523897abc829c90fe07225923c94ac Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 21:01:36 -0500 Subject: [PATCH 03/13] Use link and 2PR username instead of bool. --- .../workflows/build-and-upload-release.yml | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 5595f0fbe..253fd9ff1 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -18,11 +18,14 @@ on: required: false default: false type: boolean - bypass-e2e-test: - description: "Bypass E2E Test" + e2e-test-bypass-link: + description: 'Link to failed E2E test run (for bypass)' required: false - default: false - type: boolean + type: string + e2e-test-bypass-approver: + description: 'GitHub username of person who can 2PR bypassing the E2E test run' + required: false + type: string tag: description: 'Staging Artifact Tag' required: false @@ -35,11 +38,14 @@ on: required: false default: false type: boolean - bypass-e2e-test: - description: "Bypass E2E Test" + e2e-test-bypass-link: + description: 'Link to failed E2E test run (for bypass)' required: false - default: false - type: boolean + type: string + e2e-test-bypass-approver: + description: 'GitHub username of person who can 2PR bypassing the E2E test run' + required: false + type: string tag: description: 'Staging Artifact Tag' required: false @@ -146,7 +152,7 @@ jobs: platforms: linux/amd64, linux/arm64 e2e-test: - if: ${{ !inputs.bypass-e2e-test }} + if: ${{ inputs.e2e-test-bypass-link == '' && inputs.e2e-test-bypass-approver == '' }} name: "Application Signals E2E Test" needs: [MakeBinary] uses: ./.github/workflows/application-signals-e2e-test.yml @@ -164,9 +170,11 @@ jobs: id-token: write contents: read runs-on: ubuntu-latest + environment: 'production' # Adding this makes job require reviewer: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/reviewing-deployments. steps: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 47876541d565697fac864e0624e4f2d141bb5f73 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 21:01:58 -0500 Subject: [PATCH 04/13] Add test production environment job. --- .github/workflows/build-and-upload-release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 253fd9ff1..1aafee7c6 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -163,6 +163,13 @@ jobs: with: tag: ${{ inputs.tag }} + test-production-env: + runs-on: ubuntu-latest + environment: 'production' + steps: + - name: Test Production Environment + run: echo "Successfully accessed production environment." + push-release-ecr: if: ${{ inputs.release }} needs: [MakeTABinary, e2e-test] From 399f48b7d1ba755be8c4200f9576d0e95bab5695 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 21:16:51 -0500 Subject: [PATCH 05/13] Remove test job. --- .github/workflows/build-and-upload-release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 1aafee7c6..253fd9ff1 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -163,13 +163,6 @@ jobs: with: tag: ${{ inputs.tag }} - test-production-env: - runs-on: ubuntu-latest - environment: 'production' - steps: - - name: Test Production Environment - run: echo "Successfully accessed production environment." - push-release-ecr: if: ${{ inputs.release }} needs: [MakeTABinary, e2e-test] From 2d28709909a3c4853863ce8f7712b05a11a3f3b2 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 22:08:28 -0500 Subject: [PATCH 06/13] Fix wording. --- .github/workflows/build-and-upload-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 253fd9ff1..3d9cbf7ce 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -23,7 +23,7 @@ on: required: false type: string e2e-test-bypass-approver: - description: 'GitHub username of person who can 2PR bypassing the E2E test run' + description: 'GitHub username of person who can 2PR bypass for the E2E test run' required: false type: string tag: @@ -43,7 +43,7 @@ on: required: false type: string e2e-test-bypass-approver: - description: 'GitHub username of person who can 2PR bypassing the E2E test run' + description: 'GitHub username of person who can 2PR bypass for the E2E test run' required: false type: string tag: From 9a5b9b0ce50358c1f579557ea36c4a2f0b110106 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 22:27:46 -0500 Subject: [PATCH 07/13] Add bypass summary. --- .github/workflows/build-and-upload-release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 3d9cbf7ce..a3dcf984c 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -151,6 +151,16 @@ jobs: tags: ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }} platforms: linux/amd64, linux/arm64 + bypass-info: + if: ${{ inputs.e2e-test-bypass-link != '' || inputs.e2e-test-bypass-approver != '' }} + runs-on: ubuntu-latest + steps: + - name: Echo bypass information + run: | + echo "E2E test bypass requested" >> $GITHUB_STEP_SUMMARY + echo "Link: ${{ inputs.e2e-test-bypass-link }}" >> $GITHUB_STEP_SUMMARY + echo "Approver: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY + e2e-test: if: ${{ inputs.e2e-test-bypass-link == '' && inputs.e2e-test-bypass-approver == '' }} name: "Application Signals E2E Test" From 02e99b3b683984eaefed7f63bb9a0eff0e118e42 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 23:00:11 -0500 Subject: [PATCH 08/13] Fix descriptions and make summary bold. --- .github/workflows/build-and-upload-release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index a3dcf984c..150760948 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -19,11 +19,11 @@ on: default: false type: boolean e2e-test-bypass-link: - description: 'Link to failed E2E test run (for bypass)' + description: 'Failed E2E Test Run Link (for bypass)' required: false type: string e2e-test-bypass-approver: - description: 'GitHub username of person who can 2PR bypass for the E2E test run' + description: '2PR GitHub Username (for bypass)' required: false type: string tag: @@ -39,11 +39,11 @@ on: default: false type: boolean e2e-test-bypass-link: - description: 'Link to failed E2E test run (for bypass)' + description: 'Failed E2E Test Run Link (for bypass)' required: false type: string e2e-test-bypass-approver: - description: 'GitHub username of person who can 2PR bypass for the E2E test run' + description: '2PR GitHub Username (for bypass)' required: false type: string tag: @@ -157,9 +157,9 @@ jobs: steps: - name: Echo bypass information run: | - echo "E2E test bypass requested" >> $GITHUB_STEP_SUMMARY - echo "Link: ${{ inputs.e2e-test-bypass-link }}" >> $GITHUB_STEP_SUMMARY - echo "Approver: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY + echo "**E2E test bypass requested**" >> $GITHUB_STEP_SUMMARY + echo "**Failing Test**: ${{ inputs.e2e-test-bypass-link }}" >> $GITHUB_STEP_SUMMARY + echo "**2PR: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY e2e-test: if: ${{ inputs.e2e-test-bypass-link == '' && inputs.e2e-test-bypass-approver == '' }} From dda32433f413ffd4172a62f7aa8546bec9346209 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 23:01:46 -0500 Subject: [PATCH 09/13] Fix typo. --- .github/workflows/build-and-upload-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 150760948..8db0f4414 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -159,7 +159,7 @@ jobs: run: | echo "**E2E test bypass requested**" >> $GITHUB_STEP_SUMMARY echo "**Failing Test**: ${{ inputs.e2e-test-bypass-link }}" >> $GITHUB_STEP_SUMMARY - echo "**2PR: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY + echo "**2PR**: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY e2e-test: if: ${{ inputs.e2e-test-bypass-link == '' && inputs.e2e-test-bypass-approver == '' }} From eff74e6f682601c3e13e4936c015cb7358e96c44 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Wed, 4 Dec 2024 23:51:30 -0500 Subject: [PATCH 10/13] Add test production environment job. --- .github/workflows/build-and-upload-release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 8db0f4414..df16d45b6 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -173,6 +173,13 @@ jobs: with: tag: ${{ inputs.tag }} + test-production-env: + runs-on: ubuntu-latest + environment: 'production' + steps: + - name: Test Production Environment + run: echo "Successfully accessed production environment." + push-release-ecr: if: ${{ inputs.release }} needs: [MakeTABinary, e2e-test] From b383c057cf2185416dd72b2ab3d4353146bfb45c Mon Sep 17 00:00:00 2001 From: musa-asad Date: Thu, 5 Dec 2024 01:14:24 -0500 Subject: [PATCH 11/13] Remove test job. --- .github/workflows/build-and-upload-release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index df16d45b6..8db0f4414 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -173,13 +173,6 @@ jobs: with: tag: ${{ inputs.tag }} - test-production-env: - runs-on: ubuntu-latest - environment: 'production' - steps: - - name: Test Production Environment - run: echo "Successfully accessed production environment." - push-release-ecr: if: ${{ inputs.release }} needs: [MakeTABinary, e2e-test] From d31d036475e0e4970b6f03addc1f2b9521718ba2 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Thu, 5 Dec 2024 10:13:59 -0500 Subject: [PATCH 12/13] Remove required reviewer. --- .github/workflows/build-and-upload-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index 8db0f4414..a638f889a 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -180,7 +180,6 @@ jobs: id-token: write contents: read runs-on: ubuntu-latest - environment: 'production' # Adding this makes job require reviewer: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/reviewing-deployments. steps: - name: Set up QEMU uses: docker/setup-qemu-action@v3 From 20338241a8206d13c3ae7267fc25cbf7f8742bc0 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Thu, 5 Dec 2024 10:17:50 -0500 Subject: [PATCH 13/13] Nit: replace PR with Approver. --- .github/workflows/build-and-upload-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-upload-release.yml b/.github/workflows/build-and-upload-release.yml index a638f889a..379b55b4c 100644 --- a/.github/workflows/build-and-upload-release.yml +++ b/.github/workflows/build-and-upload-release.yml @@ -23,7 +23,7 @@ on: required: false type: string e2e-test-bypass-approver: - description: '2PR GitHub Username (for bypass)' + description: 'Approver GitHub Username (for bypass)' required: false type: string tag: @@ -43,7 +43,7 @@ on: required: false type: string e2e-test-bypass-approver: - description: '2PR GitHub Username (for bypass)' + description: 'Approver GitHub Username (for bypass)' required: false type: string tag: @@ -159,7 +159,7 @@ jobs: run: | echo "**E2E test bypass requested**" >> $GITHUB_STEP_SUMMARY echo "**Failing Test**: ${{ inputs.e2e-test-bypass-link }}" >> $GITHUB_STEP_SUMMARY - echo "**2PR**: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY + echo "**Approver**: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY e2e-test: if: ${{ inputs.e2e-test-bypass-link == '' && inputs.e2e-test-bypass-approver == '' }}