From dd54ac75b0605e811209d4064f623484f8ea7b25 Mon Sep 17 00:00:00 2001 From: Jag Jayaprakash Date: Mon, 14 Oct 2024 09:48:32 -0700 Subject: [PATCH 1/6] NEW (Extension) @W-16812379@ Add pager to alert to smoke test failure --- .github/workflows/daily-smoke-test.yml | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/daily-smoke-test.yml b/.github/workflows/daily-smoke-test.yml index d29d670..3502d6e 100644 --- a/.github/workflows/daily-smoke-test.yml +++ b/.github/workflows/daily-smoke-test.yml @@ -28,4 +28,51 @@ jobs: create-vsix-artifact: name: 'Upload VSIX as artifact' uses: ./.github/workflows/create-vsix-artifact.yml + + # === Report any problems === + steps: + name: Report problems + # There are problems if any step failed or was skipped. + # Note that the `join()` call omits null values, so if any steps were skipped, they won't have a corresponding + # value in the string. + if: ${{ failure() || cancelled() }} + shell: bash + env: + # If we're here because steps failed or were skipped, then that's a critical problem. Otherwise it's a normal one. + # We can't use the `failure()` or `cancelled()` convenience methods outside of the `if` condition, hence the + # `contains()` calls. + IS_CRITICAL: ${{ contains(join(steps.*.outcome), 'failure') || contains(join(steps.*.outcome), 'skipped') }} + # A link to this run, so the PagerDuty assignee can quickly get here. + RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + + if [[ ${{ env.IS_CRITICAL }} == true ]]; then + ALERT_SEV="critical" + ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}" + else + ALERT_SEV="info" + ALERT_SUMMARY="Production heartbeat script succeeded with retries on ${{ runner.os }}" + fi + # Define a helper function to create our POST request's data, to sidestep issues with nested quotations. + generate_post_data() { + # This is known as a HereDoc, and it lets us declare multi-line input ending when the specified limit string, + # in this case EOF, is encountered. + cat < Date: Mon, 14 Oct 2024 09:53:39 -0700 Subject: [PATCH 2/6] NEW (Extension) @W-16812379@ Add pager to alert to smoke test failure --- .github/workflows/daily-smoke-test.yml | 88 +++++++++++++------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/workflows/daily-smoke-test.yml b/.github/workflows/daily-smoke-test.yml index 3502d6e..17b06b5 100644 --- a/.github/workflows/daily-smoke-test.yml +++ b/.github/workflows/daily-smoke-test.yml @@ -30,49 +30,49 @@ jobs: uses: ./.github/workflows/create-vsix-artifact.yml # === Report any problems === - steps: - name: Report problems - # There are problems if any step failed or was skipped. - # Note that the `join()` call omits null values, so if any steps were skipped, they won't have a corresponding - # value in the string. - if: ${{ failure() || cancelled() }} - shell: bash - env: - # If we're here because steps failed or were skipped, then that's a critical problem. Otherwise it's a normal one. - # We can't use the `failure()` or `cancelled()` convenience methods outside of the `if` condition, hence the - # `contains()` calls. - IS_CRITICAL: ${{ contains(join(steps.*.outcome), 'failure') || contains(join(steps.*.outcome), 'skipped') }} - # A link to this run, so the PagerDuty assignee can quickly get here. - RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} +steps: + name: Report problems + # There are problems if any step failed or was skipped. + # Note that the `join()` call omits null values, so if any steps were skipped, they won't have a corresponding + # value in the string. + if: ${{ failure() || cancelled() }} + shell: bash + env: + # If we're here because steps failed or were skipped, then that's a critical problem. Otherwise it's a normal one. + # We can't use the `failure()` or `cancelled()` convenience methods outside of the `if` condition, hence the + # `contains()` calls. + IS_CRITICAL: ${{ contains(join(steps.*.outcome), 'failure') || contains(join(steps.*.outcome), 'skipped') }} + # A link to this run, so the PagerDuty assignee can quickly get here. + RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - run: | + run: | - if [[ ${{ env.IS_CRITICAL }} == true ]]; then - ALERT_SEV="critical" - ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}" - else - ALERT_SEV="info" - ALERT_SUMMARY="Production heartbeat script succeeded with retries on ${{ runner.os }}" - fi - # Define a helper function to create our POST request's data, to sidestep issues with nested quotations. - generate_post_data() { - # This is known as a HereDoc, and it lets us declare multi-line input ending when the specified limit string, - # in this case EOF, is encountered. - cat < Date: Mon, 14 Oct 2024 10:48:45 -0700 Subject: [PATCH 3/6] NEW (Extension) @W-16812379@ Add pager to alert to smoke test failure --- .github/workflows/daily-smoke-test.yml | 93 +++++++++++++------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/.github/workflows/daily-smoke-test.yml b/.github/workflows/daily-smoke-test.yml index 17b06b5..5478b19 100644 --- a/.github/workflows/daily-smoke-test.yml +++ b/.github/workflows/daily-smoke-test.yml @@ -24,55 +24,56 @@ jobs: # For daily builds, we want to make sure we haven't pushed a breaking change # to the scanner's `dev` branch. use-scanner-tarball: true + # === Report any problems === + steps: + name: Report problems + # There are problems if any step failed or was skipped. + # Note that the `join()` call omits null values, so if any steps were skipped, they won't have a corresponding + # value in the string. + if: ${{ failure() || cancelled() }} + shell: bash + env: + # If we're here because steps failed or were skipped, then that's a critical problem. Otherwise it's a normal one. + # We can't use the `failure()` or `cancelled()` convenience methods outside of the `if` condition, hence the + # `contains()` calls. + IS_CRITICAL: ${{ contains(join(steps.*.outcome), 'failure') || contains(join(steps.*.outcome), 'skipped') }} + # A link to this run, so the PagerDuty assignee can quickly get here. + RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + + run: | + + if [[ ${{ env.IS_CRITICAL }} == true ]]; then + ALERT_SEV="critical" + ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}" + else + ALERT_SEV="info" + ALERT_SUMMARY="Production heartbeat script succeeded with retries on ${{ runner.os }}" + fi + # Define a helper function to create our POST request's data, to sidestep issues with nested quotations. + generate_post_data() { + # This is known as a HereDoc, and it lets us declare multi-line input ending when the specified limit string, + # in this case EOF, is encountered. + cat < Date: Mon, 14 Oct 2024 11:02:38 -0700 Subject: [PATCH 4/6] NEW (Extension) @W-16812379@ Add pager to alert to smoke test failure --- .github/workflows/daily-smoke-test.yml | 87 ++++++++++++-------------- 1 file changed, 40 insertions(+), 47 deletions(-) diff --git a/.github/workflows/daily-smoke-test.yml b/.github/workflows/daily-smoke-test.yml index 5478b19..278f148 100644 --- a/.github/workflows/daily-smoke-test.yml +++ b/.github/workflows/daily-smoke-test.yml @@ -24,56 +24,49 @@ jobs: # For daily builds, we want to make sure we haven't pushed a breaking change # to the scanner's `dev` branch. use-scanner-tarball: true - # === Report any problems === - steps: - name: Report problems - # There are problems if any step failed or was skipped. - # Note that the `join()` call omits null values, so if any steps were skipped, they won't have a corresponding - # value in the string. - if: ${{ failure() || cancelled() }} - shell: bash - env: - # If we're here because steps failed or were skipped, then that's a critical problem. Otherwise it's a normal one. - # We can't use the `failure()` or `cancelled()` convenience methods outside of the `if` condition, hence the - # `contains()` calls. - IS_CRITICAL: ${{ contains(join(steps.*.outcome), 'failure') || contains(join(steps.*.outcome), 'skipped') }} - # A link to this run, so the PagerDuty assignee can quickly get here. - RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - - run: | - - if [[ ${{ env.IS_CRITICAL }} == true ]]; then - ALERT_SEV="critical" - ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}" - else - ALERT_SEV="info" - ALERT_SUMMARY="Production heartbeat script succeeded with retries on ${{ runner.os }}" - fi - # Define a helper function to create our POST request's data, to sidestep issues with nested quotations. - generate_post_data() { - # This is known as a HereDoc, and it lets us declare multi-line input ending when the specified limit string, - # in this case EOF, is encountered. - cat < Date: Tue, 15 Oct 2024 11:58:34 -0700 Subject: [PATCH 5/6] NEW (Extension) @W-16812379@ Add pager to alert to smoke test failure --- .github/workflows/daily-smoke-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-smoke-test.yml b/.github/workflows/daily-smoke-test.yml index 278f148..290cc47 100644 --- a/.github/workflows/daily-smoke-test.yml +++ b/.github/workflows/daily-smoke-test.yml @@ -33,7 +33,7 @@ jobs: name: 'Report problems' runs-on: ubuntu-latest needs: [build-scanner-tarball, smoke-test, create-vsix-artifact] - if: ${{ failure() || cancelled() }} + # if: ${{ failure() || cancelled() }} steps: - name: Report problems shell: bash From 836779b2bcee5eaef82705bf5b7969c457fd0fc1 Mon Sep 17 00:00:00 2001 From: Jag Jayaprakash Date: Tue, 15 Oct 2024 12:06:53 -0700 Subject: [PATCH 6/6] NEW (Extension) @W-16812379@ Add pager to alert to smoke test failure --- .github/workflows/daily-smoke-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-smoke-test.yml b/.github/workflows/daily-smoke-test.yml index 290cc47..278f148 100644 --- a/.github/workflows/daily-smoke-test.yml +++ b/.github/workflows/daily-smoke-test.yml @@ -33,7 +33,7 @@ jobs: name: 'Report problems' runs-on: ubuntu-latest needs: [build-scanner-tarball, smoke-test, create-vsix-artifact] - # if: ${{ failure() || cancelled() }} + if: ${{ failure() || cancelled() }} steps: - name: Report problems shell: bash