-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve automated Slack messaging #425
Conversation
…nction for use elsewhere
Two things:
|
…o amogan/improved_slack_messaging
|
OK, I ran the v5 integration test which I knew would fail, and the output to Slack looked great (2:21 PM Chicago time message in However, while playing around a bit, I uncovered something interesting: basically, if I cancel an integration test which runs using the |
I've just confirmed that with the latest commits on this branch, canceling an integration test Workflow sends a "Cancelled" message; PR is approved. |
Last week, Eric requested (and Alessandro seconded) that our automated Slack workflow failure alerts list the jobs and steps that failed. I took this as an opportunity to overhaul how our messages are generated. The major changes are listed below.
slack-github-action
to v2, which requires some minor syntax changes in how the workflow is called.slack-notification.yml
reusable workflow now uses agh api
call to get a JSON list of failed jobs and steps.slack_payload_generator.py
underscripts/github-ci
. This script parses thegh api
output to generate a JSON payload that can be parsed byslack-github-action
.slack_payload_generator.py
gets a brief error summary from the junit xml files output by our pytests.This new method allows for more flexibility and modularity when generating Slack messages, meaning future requests for changes or improvements should be easier to handle.
Note to self: remove
ref: amogan/improved_slack_messaging
after this is merged.