action #137828
closed[spike solution][timeboxed:10h] Notification if one of the queries on https://os-autoinst.github.io/qa-tools-backlog-assistant/ is red, e.g. write email to our Slack or o3-admins from backlogger size:S
Description
Motivation¶
See #136007
Acceptance criteria¶
- AC1: We receive a notification if one of the queries on https://os-autoinst.github.io/qa-tools-backlog-assistant/ is red
Suggestions¶
- Note: Emails from outside SUSE aren't delivered to our internal Slack
- We could alternatively or additionally use the Open Graph HTML preview feature, so that we can see a backlog status as an SVG when posting the link to Slack
- Use a Workflow based on a webhook - this was introduced with the "new" workflows which have different triggers, so we could have a URL that produces a message, and has variables as well e.g.
curl -H "Content-Type: application/json" -d '{"query":"Untriaged QA"}'
. Or read about Slack bot accounts and push to custom URL. Also see https://api.slack.com/messaging/webhooks - Example SCCBot Messaging: https://gitlab.suse.de/scc/infrastructure/happy-customer-deploy/-/blob/master/gitlab-ci/pipeline-environments-template.yml?ref_type=heads#L36-48
Updated by tinita about 1 year ago
- Copied from action #136007: Conduct "lessons learned" with Five Why analysis for network protocols failures on multimachine tests on HA/SAP size:S added
Updated by livdywan about 1 year ago
- Description updated (diff)
I added a note on Slack workflows based on webhooks. I only just saw that this was recently enabled
Updated by tinita 12 months ago
- Subject changed from Write email to our Slack or o3-admins from backlogger if one of the queries is red to [spike solution][timeboxed:10h] Notification if one of the queries on https://os-autoinst.github.io/qa-tools-backlog-assistant/ is red, e.g. write email to our Slack or o3-admins from backlogger size:S
- Description updated (diff)
- Status changed from New to Workable
Updated by jbaier_cz 11 months ago
- Status changed from Workable to In Progress
Previews in Slack are documented in https://api.slack.com/reference/messaging/link-unfurling#classic_unfurl
It seems to be possible to generate a simple svg from html by just wrapping the table into some other tags.
<svg xmlns="http://www.w3.org/2000/svg">
<!-- Common use case: embed HTML text into SVG -->
<foreignObject xmlns="http://www.w3.org/2000/svg" x="0" y="0" width="100%" height="100%">
<!--
In the context of SVG embedded in an HTML document, the XHTML
namespace could be omitted, but it is mandatory in the
context of an SVG document
-->
<table xmlns="http://www.w3.org/1999/xhtml">
...
</table>
</foreignObject>
</svg>
As a first step, I will try to enhance the backlogger workflow to also generate svg version of the table (a full table and a second one with only the failures for the notification). Those files can be then used together with the OG meta tags to create a nice preview which in turn can be posted/shared/e-mailed as a notification on failure.
For the notification, we will probably need to enhance the backlogger itself to either output some metadata (at least result_icons
usage) or introduce different exit codes. We can then use outputs and/or status checks in the workflow to react and create the necessary notification.
Updated by jbaier_cz 11 months ago
https://github.com/openSUSE/backlogger/pull/22 should target the ability to react on not satisfied queries.
As tinita pointed out, SVG format is not supported inside OG tags, so we might need to go around it and maybe generate md -> html -> pdf -> png (maybe with pandoc action) or generate the image with HTML5 canvas feature.
Updated by openqa_review 11 months ago
- Due date set to 2024-01-20
Setting due date based on mean cycle time of SUSE QE Tools
Updated by jbaier_cz 11 months ago
jbaier_cz wrote in #note-13:
I am able to render the page into png quite nicely with the following pipe:
kramdown index.md | weasyprint - - | magick - -trim image.png
. All components should be available in standard repositories, so adapting the pipeline to use this should not be hard.
Note, command magick
is for ImageMagick >= 7.0 which is (sadly) not in the github ubuntu image. One need to use convert
.
Updated by jbaier_cz 11 months ago
After dealing with some problems related to the Ubuntu container used in the Github action, I have a new pipeline step which will render the status page into a PNG image: https://github.com/openSUSE/backlogger/pull/23
Updated by jbaier_cz 10 months ago
- Status changed from In Progress to Feedback
PR for the pretty previews: https://github.com/openSUSE/backlogger/pull/25. Also there is a draft request which can be used for the notification. The added step is supposed to run only when the backlogger status is non-zero: https://github.com/os-autoinst/qa-tools-backlog-assistant/pull/43.
Updated by jbaier_cz 10 months ago
- Copied to action #153466: Notification if one of the queries on https://os-autoinst.github.io/qa-tools-backlog-assistant/ is red, e.g. write email to our Slack or o3-admins from backlogger size:M added
Updated by jbaier_cz 10 months ago
- Status changed from Feedback to Resolved
All feature requests are merged, so it should be possible to add the notification workflow as suggested in https://github.com/os-autoinst/qa-tools-backlog-assistant/pull/43. The follow up ticket has been created. With this I suppose the spike solution might be considered as resolved.