Project

General

Profile

Actions

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 over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
2021-11-10
Due date:
2021-11-25
% Done:

0%

Estimated time:

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 issues 3 (0 open3 closed)

Related to QA - action #101722: openqa-review: Do not post reminder comment in progress.opensuse.org if comment would be exactly the same as the last size:MResolvedtinita2021-10-14

Actions
Related to openQA Project - action #102440: openqa-review pipeline failed with assert self.issue_type == "bugzilla"Resolvedmkittler2021-07-282021-11-30

Actions
Related to QA - action #102350: Move openqa-review CI to Github ActionsResolvedtinita2021-11-102021-11-25

Actions
Actions #1

Updated by okurz over 2 years ago

  • 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
Actions #2

Updated by tinita over 2 years ago

  • 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.

Actions #3

Updated by livdywan over 2 years ago

  • 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)
Actions #4

Updated by openqa_review over 2 years ago

  • Due date set to 2021-11-25

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

Actions #5

Updated by tinita over 2 years ago

So far I can't reproduce it locally.

PR https://github.com/os-autoinst/openqa_review/pull/193 for better logging (traceback of the TypeError) merged

I found out this started on November 5th. I looked into October 29th until today.

Actions #6

Updated by tinita over 2 years ago

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

Actions #7

Updated by tinita over 2 years ago

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.

Actions #8

Updated by tinita over 2 years ago

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&params=%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}
Actions #9

Updated by tinita over 2 years ago

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.

Actions #11

Updated by tinita over 2 years ago

PR: https://github.com/os-autoinst/openqa_review/pull/195

tox -e cov, black and flake8 is successful for me locally.

Travis CI doesn't run on the PR because we used all credits this months already. Time to switch.

Actions #12

Updated by tinita over 2 years ago

  • Copied to action #102350: Move openqa-review CI to Github Actions added
Actions #13

Updated by tinita over 2 years ago

  • Copied to deleted (action #102350: Move openqa-review CI to Github Actions)
Actions #14

Updated by tinita over 2 years ago

  • Blocked by action #102350: Move openqa-review CI to Github Actions added
Actions #15

Updated by tinita over 2 years ago

  • Status changed from In Progress to Blocked
Actions #16

Updated by okurz over 2 years ago

  • Status changed from Blocked to In Progress

As https://github.com/os-autoinst/openqa_review/pull/195 could complete tests on travis CI I don't consider this blocked.

Actions #17

Updated by okurz over 2 years ago

  • 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

Actions #18

Updated by okurz over 2 years ago

  • Related to action #102440: openqa-review pipeline failed with assert self.issue_type == "bugzilla" added
Actions #19

Updated by mkittler over 2 years ago

Looks like only the 'NoneType' object is not subscriptable part was fixed by https://github.com/os-autoinst/openqa_review/pull/195. So I've been creating a PR to fix the assertion (see #102440#note-5).

Actions #20

Updated by okurz over 2 years ago

  • Blocked by deleted (action #102350: Move openqa-review CI to Github Actions)
Actions #21

Updated by okurz over 2 years ago

  • Related to action #102350: Move openqa-review CI to Github Actions added
Actions #22

Updated by tinita over 2 years ago

I attempted to fix the AssertionError as part of #101722 with https://github.com/os-autoinst/openqa_review/pull/192
But apparently I did not catch all cases.

Sorry I didn't mention this here.

Actions #23

Updated by tinita over 2 years ago

  • Status changed from In Progress to Resolved

This was actually resolved (partially by @mkittler)

Actions

Also available in: Atom PDF