Project

General

Profile

Actions

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

Added by tinita 12 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2023-10-12
Due date:
2024-01-20
% Done:

0%

Estimated time:

Description

Motivation

See #136007

Acceptance criteria

Suggestions


Related issues 2 (0 open2 closed)

Copied from openQA Infrastructure - action #136007: Conduct "lessons learned" with Five Why analysis for network protocols failures on multimachine tests on HA/SAP size:SResolvedtinita

Actions
Copied to openQA Project - 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:MResolveddheidler2024-02-03

Actions
Actions #1

Updated by tinita 12 months 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
Actions #2

Updated by tinita 12 months ago

  • Description updated (diff)
Actions #3

Updated by tinita 12 months ago

  • Tags deleted (infra, mob)
Actions #4

Updated by okurz 12 months ago

  • Target version set to Tools - Next
Actions #5

Updated by livdywan 12 months ago

  • Description updated (diff)

I added a note on Slack workflows based on webhooks. I only just saw that this was recently enabled

Actions #6

Updated by livdywan 12 months ago

  • Description updated (diff)
Actions #7

Updated by okurz 11 months ago

  • Tags deleted (infra)
Actions #8

Updated by okurz 10 months ago

  • Target version changed from Tools - Next to Ready
Actions #9

Updated by tinita 10 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
Actions #10

Updated by jbaier_cz 9 months ago

  • Assignee set to jbaier_cz
Actions #11

Updated by jbaier_cz 9 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.

Actions #12

Updated by jbaier_cz 9 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.

Actions #13

Updated by jbaier_cz 9 months ago

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.

Actions #14

Updated by openqa_review 9 months ago

  • Due date set to 2024-01-20

Setting due date based on mean cycle time of SUSE QE Tools

Actions #15

Updated by jbaier_cz 9 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.

Actions #16

Updated by jbaier_cz 9 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

Actions #17

Updated by jbaier_cz 9 months ago

After both PR are merged, the last step will be to add the Open Graph definition in the index page (and utilize the preview image) and use the return code of the backlogger to generate the notify action (e-mail/webhook/...).

Actions #18

Updated by jbaier_cz 9 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.

Actions #19

Updated by jbaier_cz 9 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
Actions #20

Updated by jbaier_cz 9 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.

Actions

Also available in: Atom PDF