From 7477342dc0f246f64b5f19aa72e7f6986f86bff4 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:03:17 -0400 Subject: [PATCH 01/25] Create notification_trial --- .github/workflows/notification_trial | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/notification_trial diff --git a/.github/workflows/notification_trial b/.github/workflows/notification_trial new file mode 100644 index 0000000..0ac6e5f --- /dev/null +++ b/.github/workflows/notification_trial @@ -0,0 +1,25 @@ +name: Failure Notification + +on: + push: + +jobs: + failing-job: + runs-on: ubuntu-latest + steps: + - name: failing step + run: exit 1 + on-failure: + runs-on: ubuntu-latest + if: ${{ always() && (needs.failing-job.result == 'failure' || needs.failing-job.result == 'timed_out') }} + needs: + - failing-job + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_USERNAME: Leo + SLACK_TITLE: Workflow ${{ needs.failing-job.result }} + MSG_MINIMAL: actions url + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} From 2308587450fbdf526c8786fb9fbde4852ff4e47c Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:04:14 -0400 Subject: [PATCH 02/25] Rename notification_trial to notification_trial.yml --- .github/workflows/{notification_trial => notification_trial.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{notification_trial => notification_trial.yml} (100%) diff --git a/.github/workflows/notification_trial b/.github/workflows/notification_trial.yml similarity index 100% rename from .github/workflows/notification_trial rename to .github/workflows/notification_trial.yml From 3990847787ff5bd1f367cfbeafad729fdb763ce4 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:10:16 -0400 Subject: [PATCH 03/25] try with env fields removed --- .github/workflows/notification_trial.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 0ac6e5f..4009772 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -19,7 +19,4 @@ jobs: - name: Slack Notification uses: rtCamp/action-slack-notify@v2 env: - SLACK_USERNAME: Leo - SLACK_TITLE: Workflow ${{ needs.failing-job.result }} - MSG_MINIMAL: actions url SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} From 23a625f97cc7e4980b61cc1967f92f214c6d7d84 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:17:21 -0400 Subject: [PATCH 04/25] does it ping? --- .github/workflows/notification_trial.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 4009772..2c7a8f3 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -19,4 +19,6 @@ jobs: - name: Slack Notification uses: rtCamp/action-slack-notify@v2 env: + SLACK_USERNAME: arunkannawadi-bot + SLACK_LINK_NAMES: arunkannawadi SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} From 19fd569d6842bf1453480aac51e19bce1a99c152 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:25:05 -0400 Subject: [PATCH 05/25] remove bragging --- .github/workflows/notification_trial.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 2c7a8f3..c87da37 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -19,6 +19,6 @@ jobs: - name: Slack Notification uses: rtCamp/action-slack-notify@v2 env: - SLACK_USERNAME: arunkannawadi-bot - SLACK_LINK_NAMES: arunkannawadi + MSG_MINIMAL: true + SLACK_FOOTER: "" SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} From fa7fa11b16565be61002d0de123e303b6a17466d Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:28:55 -0400 Subject: [PATCH 06/25] set title --- .github/workflows/notification_trial.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index c87da37..72b8e44 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -19,6 +19,7 @@ jobs: - name: Slack Notification uses: rtCamp/action-slack-notify@v2 env: - MSG_MINIMAL: true + MSG_MINIMAL: actions_url SLACK_FOOTER: "" + SLACK_TITLE: LSST metadetect tests failing on lsst-dev SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} From b1442807190ed47cd7aac7d06253132df3b0901a Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:32:54 -0400 Subject: [PATCH 07/25] trigger on schedule or push --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 72b8e44..b18f00d 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -11,7 +11,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ always() && (needs.failing-job.result == 'failure' || needs.failing-job.result == 'timed_out') }} + if: ${{ (github.event.schedule || github.event.push) && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From 15df27f04c9d153c23c6944587f38890036c443b Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:37:33 -0400 Subject: [PATCH 08/25] trigger on PR --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index b18f00d..b050284 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -11,7 +11,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ (github.event.schedule || github.event.push) && needs.failing-job.result == 'failure' }} + if: ${{ (github.event.schedule || github.event.push || github.event.pull_request) && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From 6b3e86ab3cb68aa1f1737a81361d82232c9c1e26 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:43:05 -0400 Subject: [PATCH 09/25] run on schedule --- .github/workflows/notification_trial.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index b050284..6254e40 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -2,6 +2,8 @@ name: Failure Notification on: push: + schedule: + - cron: "0-58/2 * * * *" jobs: failing-job: From 33c46cf6580967ea2331914230ca7bc941546a64 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:46:45 -0400 Subject: [PATCH 10/25] schedule or push --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 6254e40..0b32d11 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -13,7 +13,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ (github.event.schedule || github.event.push || github.event.pull_request) && needs.failing-job.result == 'failure' }} + if: ${{ (github.event_name == 'schedule' || github.event_name == "push") && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From bd03723c88bd2864462417356292a5db53d40d8a Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:48:19 -0400 Subject: [PATCH 11/25] single quotes --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 0b32d11..65d1408 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -13,7 +13,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ (github.event_name == 'schedule' || github.event_name == "push") && needs.failing-job.result == 'failure' }} + if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From 23ff33a0184c40cb79ab194f39460c7f11b5732e Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 11:50:29 -0400 Subject: [PATCH 12/25] on pR --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 65d1408..4accf10 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -13,7 +13,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ (github.event_name == 'schedule' || github.event_name == 'push') && needs.failing-job.result == 'failure' }} + if: ${{ (github.event_name == 'schedule' || github.event_name == 'pull_request') && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From 173ecbebe5669e0b8f373c0597872c5a03f207c1 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 15:39:54 -0400 Subject: [PATCH 13/25] announce event_name --- .github/workflows/notification_trial.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 4accf10..3a38fd4 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -13,7 +13,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ (github.event_name == 'schedule' || github.event_name == 'pull_request') && needs.failing-job.result == 'failure' }} + if: ${{ (github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push') && needs.failing-job.result == 'failure' }} needs: - failing-job steps: @@ -25,3 +25,5 @@ jobs: SLACK_FOOTER: "" SLACK_TITLE: LSST metadetect tests failing on lsst-dev SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + - name: Announce event + run: echo ${{ github.event_name }} From 3154c8151f0a093be92986984f63f1841c1c50af Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 15:44:57 -0400 Subject: [PATCH 14/25] Run on PR --- .github/workflows/notification_trial.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 3a38fd4..57f88df 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -2,6 +2,7 @@ name: Failure Notification on: push: + pull_request: schedule: - cron: "0-58/2 * * * *" From 52dd1ddd9841b4ee1f76024f9f9422831697cd30 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 15:49:19 -0400 Subject: [PATCH 15/25] just run it always --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 57f88df..8bebfbf 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -14,7 +14,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ (github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push') && needs.failing-job.result == 'failure' }} + if: ${{ always() && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From 8402732c912a6a90ea0355c892a993102319e37f Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 15:51:13 -0400 Subject: [PATCH 16/25] if PR --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 8bebfbf..aa75bff 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -14,7 +14,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ always() && needs.failing-job.result == 'failure' }} + if: ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From ffde27dcac47a84b2c4dd1e5e128d71499c249f1 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:05:13 -0400 Subject: [PATCH 17/25] announce early on --- .github/workflows/notification_trial.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index aa75bff..e0830fc 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -10,6 +10,8 @@ jobs: failing-job: runs-on: ubuntu-latest steps: + - name: Announce event + run: echo ${{ github.event_name }} - name: failing step run: exit 1 on-failure: @@ -26,5 +28,3 @@ jobs: SLACK_FOOTER: "" SLACK_TITLE: LSST metadetect tests failing on lsst-dev SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - - name: Announce event - run: echo ${{ github.event_name }} From f6d5f815c27d4e9daf453826135091b880f801ca Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:15:09 -0400 Subject: [PATCH 18/25] announce bool value --- .github/workflows/notification_trial.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index e0830fc..73917ff 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -11,9 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Announce event - run: echo ${{ github.event_name }} + run: | + echo ${{ github.event_name }} + echo ${{ github.event_name == 'pull_request' }} - name: failing step run: exit 1 + continue-on-error: true on-failure: runs-on: ubuntu-latest if: ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }} From 5b04199b8d3f412ba3bab6790c45af81650605fc Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:16:54 -0400 Subject: [PATCH 19/25] announce again --- .github/workflows/notification_trial.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 73917ff..5926d0b 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -19,7 +19,7 @@ jobs: continue-on-error: true on-failure: runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }} + if: ${{ always() && needs.failing-job.result == 'failure' }} needs: - failing-job steps: @@ -31,3 +31,5 @@ jobs: SLACK_FOOTER: "" SLACK_TITLE: LSST metadetect tests failing on lsst-dev SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + - name: Announce event again + run: echo ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }} From 4c16a54b87ad6dcc8d6c46573438fe03b51b978c Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:19:07 -0400 Subject: [PATCH 20/25] fail_ci_if_error --- .github/workflows/notification_trial.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 5926d0b..63a61ae 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -17,6 +17,7 @@ jobs: - name: failing step run: exit 1 continue-on-error: true + fail_ci_if_error: true on-failure: runs-on: ubuntu-latest if: ${{ always() && needs.failing-job.result == 'failure' }} From 05ea0e43700fb193b135ef9b4c10da3d161a96bc Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:20:05 -0400 Subject: [PATCH 21/25] rm cont on error --- .github/workflows/notification_trial.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 63a61ae..9755426 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -16,8 +16,6 @@ jobs: echo ${{ github.event_name == 'pull_request' }} - name: failing step run: exit 1 - continue-on-error: true - fail_ci_if_error: true on-failure: runs-on: ubuntu-latest if: ${{ always() && needs.failing-job.result == 'failure' }} From fde33d819641e8e95a7f21af513716a71d7c1eb1 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:21:46 -0400 Subject: [PATCH 22/25] if --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 9755426..80500fd 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -18,7 +18,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ always() && needs.failing-job.result == 'failure' }} + if: ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }} needs: - failing-job steps: From ec6fd51816345f7d12a7808d3eaff4ef2787abb6 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:23:37 -0400 Subject: [PATCH 23/25] on PR only --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 80500fd..ee5ada2 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -18,7 +18,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }} + if: ${{ github.event_name == 'pull_request' }} needs: - failing-job steps: From 6be2f897c9d91196c4d520d46717abc091cea55f Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 16:26:32 -0400 Subject: [PATCH 24/25] always and PR --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index ee5ada2..400fb64 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -18,7 +18,7 @@ jobs: run: exit 1 on-failure: runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} + if: ${{ always() && github.event_name == 'pull_request' }} needs: - failing-job steps: From bc5be78a3fe446fe14b747c1f89b5c11f9487940 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 29 Aug 2024 19:22:24 -0400 Subject: [PATCH 25/25] rm underscore --- .github/workflows/notification_trial.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notification_trial.yml b/.github/workflows/notification_trial.yml index 400fb64..a1103b0 100644 --- a/.github/workflows/notification_trial.yml +++ b/.github/workflows/notification_trial.yml @@ -26,7 +26,7 @@ jobs: - name: Slack Notification uses: rtCamp/action-slack-notify@v2 env: - MSG_MINIMAL: actions_url + MSG_MINIMAL: actions url SLACK_FOOTER: "" SLACK_TITLE: LSST metadetect tests failing on lsst-dev SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}