Project

General

Profile

Actions

action #157858

closed

openQA Project - coordination #102915: [saga][epic] Automated classification of failures

coordination #119338: [epic] SLO Automation for openqatests SLOs

Repeated reminder comments about SLO's for openqatests size:S

Added by livdywan about 1 month ago. Updated 12 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
2024-03-25
Due date:
% Done:

0%

Estimated time:

Description

Motivation

#157522 addressed a bug that prevented reminder comments from being sent. Unfortunately comments are added even if a comment was already present. This is especially visible in immediate tickets, for example #153115, which get daily reminders - as per #116545 only one comment is supposed to be added. Maybe this is a regression or the check is not comprehensive enough.

Acceptance criteria

  • AC1: Reminders are only added once

Suggestions

  • We already have the code that should handle that: Review the implementation from #116545 for gaps in the current logic in https://github.com/openSUSE/backlogger/blob/main/backlogger.py
  • Investigate if something changed with current comments, maybe the Redmine upgrade made a difference here (complete guess)?
  • Maybe the regex needs to be adapted and/or better covered with unit testing

Related issues 2 (1 open1 closed)

Related to QA - action #119176: Automated alerts and reminders about SLO's for openqatests size:MFeedbackybonatakis2022-10-21

Actions
Copied from QA - action #157522: No ticket reminder comments about SLO's for openqatests size:MResolvedtinita

Actions
Actions #1

Updated by livdywan about 1 month ago

  • Copied from action #157522: No ticket reminder comments about SLO's for openqatests size:M added
Actions #2

Updated by livdywan about 1 month ago

  • Related to action #119176: Automated alerts and reminders about SLO's for openqatests size:M added
Actions #3

Updated by okurz about 1 month ago

  • Priority changed from High to Normal

Although I kind of like the reminders in #153115 . People should really get it that immediate tickets are not to linger around.

Actions #4

Updated by okurz about 1 month ago

  • Subject changed from Repeated reminder comments about SLO's for openqatests size:M to Repeated reminder comments about SLO's for openqatests size:S
  • Description updated (diff)
  • Status changed from New to Workable
Actions #5

Updated by tinita about 1 month ago

  • Assignee set to tinita
Actions #6

Updated by tinita about 1 month ago

  • Status changed from Workable to In Progress
Actions #7

Updated by tinita about 1 month ago

Apparently some issues can't be viewed as JSON. Additionally to the one mentioned I found the following four in our backlog:

I can't see a pattern here yet.
No error message seen in https://github.com/openSUSE/openqa-tests-backlog/actions/runs/8418509129/job/23049150715#step:3:629

curl https://progress.opensuse.org/issues/157360.json
<html><body>You are being <a href="https://progress.opensuse.org/oic/login">redirected</a>.</body></html>

One thing to improve might be to error if we don't get any JSON back.

Actions #8

Updated by tinita about 1 month ago

I created https://progress.opensuse.org/issues/157867 in the "openSUSE Admin" queue.

Actions #9

Updated by tinita about 1 month ago

Also by looking at the backlogger code I think ?include=journals is missing to actually retrieve the journals.

I can't imagine that changed since my PR.
Maybe it never worked.
I just found an issue where the API works but still a second reminder was sent:
https://progress.opensuse.org/issues/20310.json
https://progress.opensuse.org/issues/20310#note-9

Actions #10

Updated by tinita about 1 month ago

https://github.com/openSUSE/backlogger/pull/34 Fix and improve issue reminders

Actions #11

Updated by tinita about 1 month ago

  • Status changed from In Progress to Feedback
Actions #12

Updated by tinita about 1 month ago

https://github.com/openSUSE/backlogger/pull/34 merged.
Monitoring comments during the next days.
After that it should be blocked on https://progress.opensuse.org/issues/157867

Actions #13

Updated by tinita about 1 month ago

  • Status changed from Feedback to In Progress

There is no problem with the API, I was just stupid.
I somehow thought just exporting REDMINE_API_KEY did the trick for me, but that is only true for the backlogger script, not for curl.
Also I thought one needs to authenticate for all requests, so I thought authentication was working.
Will remove the according comment from the code again.

Actions #14

Updated by openqa_review about 1 month ago

  • Due date set to 2024-04-09

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

Actions #15

Updated by tinita about 1 month ago

  • Status changed from In Progress to Feedback

https://github.com/openSUSE/backlogger/pull/35 Remove comment about redmine issue

Actions #16

Updated by livdywan 30 days ago

Looks like this is not working. Pipelines are consistently failing now:

  File "/home/runner/work/openqa-tests-backlog/openqa-tests-backlog/backlogger/backlogger.py", line 101, in reminder_exists
    if not "notes" in journal or len(journal["notes"]) == 0:
                                 ^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Actions #17

Updated by tinita 30 days ago

  • Status changed from Feedback to In Progress

Hmm. I think https://github.com/openSUSE/backlogger/pull/34 didn't break it because it didn't change that logic.
It might not have been working before but we didn't see it because the feature wasn't active for very long.
We probably just need to check for journal["notes"] is not None.

Actions #18

Updated by tinita 30 days ago

  • Status changed from In Progress to Feedback
Actions #20

Updated by okurz 12 days ago

  • Due date deleted (2024-04-09)
Actions

Also available in: Atom PDF