action #102200
closed
openqa-review pipeline failed: 'NoneType' object is not subscriptable, or failed with `assert self.issue_type == "bugzilla"` size:M
Added by tinita almost 3 years ago.
Updated almost 3 years ago.
Description
Observation¶
https://gitlab.suse.de/openqa/openqa-review/-/jobs/684699
.
ERROR:openqa_review.openqa_review:Error retrieving details for bugref bsc#1174164 (https://bugzilla.suse.com/show_bug.cgi?id=1174164): 'NoneType' object is not subscriptable
.
.
.
.
.
.
.
ERROR:openqa_review.openqa_review:Error retrieving details for bugref boo#1183044 (https://bugzilla.opensuse.org/show_bug.cgi?id=1183044): 'NoneType' object is not subscriptable
.
ERROR:openqa_review.openqa_review:Error retrieving details for bugref boo#1185952 (https://bugzilla.opensuse.org/show_bug.cgi?id=1185952): 'NoneType' object is not subscriptable
ERROR:openqa_review.openqa_review:Error retrieving details for bugref bsc#1190740 (https://bugzilla.suse.com/show_bug.cgi?id=1190740): 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/bin/openqa-review", line 33, in <module>
sys.exit(load_entry_point('openqa-review==0.0.0', 'console_scripts', 'openqa-review')())
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 1575, in main
reminder_comment_on_issues(report)
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 1558, in reminder_comment_on_issues
reminder_comment_on_issue(ie, min_days_unchanged)
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 1536, in reminder_comment_on_issue
(last_comment_date, last_comment_text) = issue.last_comment
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 780, in last_comment
assert self.issue_type == "bugzilla"
AssertionError
Acceptance criteria¶
- AC1: Pipeline succeeds without python exceptions
- AC2: Report results only contain expected messages
Maybe related to #101722 ? https://github.com/os-autoinst/openqa_review/pull/190
- Related to action #101722: openqa-review: Do not post reminder comment in progress.opensuse.org if comment would be exactly the same as the last size:M added
- Status changed from New to In Progress
- Assignee set to tinita
I found out that the 'NoneType' object is not subscriptable
messages also turned up yesterday already https://gitlab.suse.de/openqa/openqa-review/-/jobs/682815 when the changes for #101722 weren't active yet, but they are not fatal.
I thought that we didn't output non-fatal stuff as errors anymore.
Anyway, the real error is the one with the Traceback, but the ERROR
messages also seem suspicious.
- Subject changed from openqa-review pipeline failed: 'NoneType' object is not subscriptable to openqa-review pipeline failed: 'NoneType' object is not subscriptable size:M
- Description updated (diff)
- Due date set to 2021-11-25
Setting due date based on mean cycle time of SUSE QE Tools
With traceback:
RROR:openqa_review.openqa_review:Error retrieving details for bugref boo#1041112 (https://bugzilla.opensuse.org/show_bug.cgi?id=1041112): 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 694, in __init__
self._init_bugzilla(bugzilla_browser)
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 734, in _init_bugzilla
self.json = bugzilla_browser.json_rpc_get("/jsonrpc.cgi", "Bug.get", {"ids": [self.bugid]})["result"]["bugs"][0]
TypeError: 'NoneType' object is not subscriptable
.
ERROR:openqa_review.openqa_review:Error retrieving details for bugref bsc#1185342 (https://bugzilla.suse.com/show_bug.cgi?id=1185342): 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 694, in __init__
self._init_bugzilla(bugzilla_browser)
File "/usr/lib/python3.8/site-packages/openqa_review/openqa_review.py", line 734, in _init_bugzilla
self.json = bugzilla_browser.json_rpc_get("/jsonrpc.cgi", "Bug.get", {"ids": [self.bugid]})["result"]["bugs"][0]
TypeError: 'NoneType' object is not subscriptable
I already suspected this line. But when I retrieve the json locally, it looks ok.
https://gitlab.suse.de/openqa/openqa-review/-/jobs/687252
A little more debugging brought me to this JSON response:
{'\''error'\'': {'\''message'\'': '\''The username or password you entered is not valid.'\'', '\''code'\'': 300}, '\''id'\'': '\''https://bugzilla.suse.com/'\'', '\''result'\'': None}
It wasn't detected as a HTTP error because bugzilla sends a 200 OK in these cases :-/
So it seems the password was expired, and I changed it now, and set the new secret in the gitlab vars.
I will change the code, so that it checks for an error
field in the JSON response.
Changing the password didn't help.
I wonder why I can login with that, but don't make a jsonrpc request.
It works with my personal user account.
% curl https://user:pass@apibugzilla.suse.com/jsonrpc.cgi?method=Bug.get¶ms=%5B%7B%22ids%22%3A+%5B1191745%5D%7D%5D"
{"error":{"message":"The username or password you entered is not valid.","code":300},"id":"https://bugzilla.suse.com/","result":null}
I set the password now to something completely different (instead of just changing the suffix which I thought was problematic due to gitlab expansion).
Now I can do a successful curl request (see last comment), but it still doesn't work from my gitlab (fork) pipeline.
Anyway, I changed the secret also in the original repo, and we will see tomorrow what happens. Meanwhile working on the code.
- Copied to action #102350: Move openqa-review CI to Github Actions added
- Copied to deleted (action #102350: Move openqa-review CI to Github Actions)
- Blocked by action #102350: Move openqa-review CI to Github Actions added
- Status changed from In Progress to Blocked
- Status changed from Blocked to In Progress
- Subject changed from openqa-review pipeline failed: 'NoneType' object is not subscriptable size:M to openqa-review pipeline failed: 'NoneType' object is not subscriptable, or failed with `assert self.issue_type == "bugzilla"` size:M
Added detail from likely duplicate #102440
- Related to action #102440: openqa-review pipeline failed with assert self.issue_type == "bugzilla" added
- Blocked by deleted (action #102350: Move openqa-review CI to Github Actions)
- Related to action #102350: Move openqa-review CI to Github Actions added
- Status changed from In Progress to Resolved
This was actually resolved (partially by @mkittler)
Also available in: Atom
PDF