action #157858
closedopenQA Project (public) - 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
0%
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
Updated by livdywan 9 months ago
- Copied from action #157522: No ticket reminder comments about SLO's for openqatests size:M added
Updated by livdywan 9 months ago
- Related to action #119176: Automated alerts and reminders about SLO's for openqatests size:M added
Updated by tinita 9 months ago
Apparently some issues can't be viewed as JSON. Additionally to the one mentioned I found the following four in our backlog:
- https://progress.opensuse.org/issues/157861 https://progress.opensuse.org/issues/157861.json
- https://progress.opensuse.org/issues/157360 https://progress.opensuse.org/issues/157360.json
- https://progress.opensuse.org/issues/135602 https://progress.opensuse.org/issues/135602.json
- https://progress.opensuse.org/issues/157462 https://progress.opensuse.org/issues/157462.json
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.
Updated by tinita 9 months ago
I created https://progress.opensuse.org/issues/157867 in the "openSUSE Admin" queue.
Updated by tinita 9 months 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
Updated by tinita 9 months ago
https://github.com/openSUSE/backlogger/pull/34 Fix and improve issue reminders
Updated by tinita 9 months 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
Updated by tinita 9 months 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.
Updated by openqa_review 9 months ago
- Due date set to 2024-04-09
Setting due date based on mean cycle time of SUSE QE Tools
Updated by tinita 9 months ago
- Status changed from In Progress to Feedback
https://github.com/openSUSE/backlogger/pull/35 Remove comment about redmine issue
Updated by livdywan 9 months 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()
Updated by tinita 9 months 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
.
Updated by tinita 9 months ago
- Status changed from In Progress to Feedback
https://github.com/openSUSE/backlogger/pull/36 Handle empty "notes" key