-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add email sending step for failed scheduled CI runs #2115
Conversation
@audiodude I guess merging this PR implies me putting the 3 secrets to make this PR helpful? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2115 +/- ##
==========================================
- Coverage 75.43% 75.24% -0.20%
==========================================
Files 41 41
Lines 3188 3195 +7
Branches 703 706 +3
==========================================
- Hits 2405 2404 -1
- Misses 666 674 +8
Partials 117 117 ☔ View full report in Codecov by Sentry. |
@kelson42 No, I already populated them. And I got a test email too. Probably want to edit the body to more clearly indicate that the email represents a CI failure. |
d2b550e
to
cdd3f70
Compare
cdd3f70
to
5096f57
Compare
5096f57
to
a55b273
Compare
Which mailgun domain is used? This should be the one owned and payed for by Kiwix from my PoV. Are we sure this is working? Usually when a step fails in a job, next steps are cancelled, so I don't get why this mail sending action would be ran in case of failure. Other than that, I'm not really convinced by this PR approach from a strategical PoV:
Do we have any literature of how other organizations are dealing with the issue? I wasn't aware of this problem, and it drives me crazy this work like it does. Not being able to be easily be notified of workflow failure seems like a nightmare for any serious maintainer. |
I'm using
Yes, the
I don't think we need to maintain any such list in a central way, though I can see that if a new developer wanted to be added to the list, it would be very difficult. We don't need to use secrets, we can hardcode email addresses into the yml file.
Yes, I have spent time researching this, and it is a limitation of scheduled tasks that failure messages only go to the last person who "touched" the yml file. See https://github.com/orgs/community/discussions/25351
Agreed it's suboptimal. https://github.com/marketplace?query=mailgun. There's an alternative here: https://github.com/marketplace/actions/action-mailgun-email
The post linked above has people discussing what they do, but the only reliable method is to have a separate email sending step. Overall, I don't necessarily believe that this is a problem that needs to be "solved" in a properly researched and documented, Kiwix-wide pattern. The problem we're facing is that mwoffliner CI breaks randomly because the tests rely on hardcoded values for fetched data that can change on the actual wikis that are being tested. When that happens, it's impossible to merge new PRs because CI is broken. So the process of merging a small change involves 1) write the PR, 2) Fix the unrelated breakage in CI 3) Merge. Instead, if CI runs daily and sends an email on failure, we can proactively fix it outside of the development of new PRs. This PR works for me for this repo. I agree that it's not appropriate as a general pattern that should be adopted for all of Kiwix. |
We have been running scheduled CI tests every day for quite a while. However, it is widely documented that when these tests fail, the only person who gets an email is the "last person who touched the yml" or something along those lines.
This PR adds a step that sends an email if the action was scheduled and there is a failure, to the comma-separated list of email addresses in the repo secret
CI_SCHEDULED_FAIL_EMAIL_TO
.