Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Notify when GHA workflow fails on master #4791

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

michaeldiamant
Copy link
Contributor

Accompanies #4789 to add Slack notifications for failed Github Action (GHA) workflows in master. Like #4789, the rationale is to be aware of a failed build in our development branch as soon as possible.

Notes:

  • In practice, I expect the workflows modified by the PR to rarely, if ever, fail in master.
  • There might be a way to streamline the notification definition through plugin usage. For the PR's purpose, I copy-pasted the approach in .github/workflows/build.yml. For a more thorough treatment, I'd prefer to create a ticket out-of-band to the PR.

@michaeldiamant michaeldiamant changed the title Notify when GHA workflow fails on master CI: Notify when GHA workflow fails on master Nov 14, 2022
@michaeldiamant michaeldiamant marked this pull request as ready for review November 14, 2022 22:51
@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #4791 (6ef05e7) into master (23890a8) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4791      +/-   ##
==========================================
- Coverage   54.68%   54.66%   -0.03%     
==========================================
  Files         414      414              
  Lines       53550    53550              
==========================================
- Hits        29286    29273      -13     
- Misses      21836    21849      +13     
  Partials     2428     2428              
Impacted Files Coverage Δ
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
network/wsPeer.go 66.50% <0.00%> (-2.43%) ⬇️
catchup/service.go 68.14% <0.00%> (-1.24%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
ledger/acctupdates.go 69.26% <0.00%> (-0.25%) ⬇️
ledger/testing/randomAccounts.go 56.61% <0.00%> (ø)
ledger/tracker.go 74.89% <0.00%> (+0.85%) ⬆️
data/transactions/verify/txn.go 77.14% <0.00%> (+0.95%) ⬆️
crypto/merkletrie/node.go 93.48% <0.00%> (+1.86%) ⬆️
crypto/merkletrie/trie.go 68.61% <0.00%> (+2.18%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
curl -X POST --data-urlencode "payload={\"text\": \"Benchmark workflow failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable') || contains(github.base_ref, 'master')) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this runs only on master. Also we can use https://www.ravsam.in/blog/send-slack-notification-when-github-actions-fails/ github action if we want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants