Project

General

Profile

Actions

action #109815

closed

QA - coordination #91646: [saga][epic] SUSE Maintenance QA workflows with fully automated testing, approval and release

QA - coordination #109818: [epic] qa-maintenance/openQAbot improvements

Add retry for HTTP requests in openQABot where missing

Added by mkittler almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2022-04-11
Due date:
% Done:

0%

Estimated time:

Description

Observation

It looks like openQABot can still fail when receiving a 500 response without retry:

++ ./oqabot.py --verbose --only-mr --metadata /etc/openqabot/mr.yml
INFO: <Response [500]> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Server error!</title>
<link rev="made" href="mailto:smash-devel@suse.de" />
<style type="text/css"><!--/*--><![CDATA[/*><!--*/ 
    body { color: #000000; background-color: #FFFFFF; }
    a:link { color: #0000CC; }
    p, address {margin-left: 3em;}
    span {font-size: smaller;}
/*]]>*/--></style>
</head>
<body>
<h1>Server error!</h1>
<p>

    The server encountered an internal error and was 
    unable to complete your request. Either the server is
    overloaded or there was an error in a CGI script.

</p>
<p>
If you think this is a server error, please contact
the <a href="mailto:smash-devel@suse.de">webmaster</a>.
</p>
<h2>Error 500</h2>
<address>
  <a href="/">smelt.suse.de</a><br />
  <span>Apache</span>
</address>
</body>
</html>
ERROR: Error getting requests: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/builds/qa-maintenance/openQABot/openqabot/update/mr.py", line 128, in _get_mr_requests
    mr = response.json()
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib64/python3.6/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib64/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR:root:Something bad happended during reading MR data from SMELT/IBS: Expecting value: line 1 column 1 (char 0)

(https://gitlab.suse.de/qa-maintenance/openQABot/-/jobs/923109)

Acceptance criteria

  • AC1: openQABot retries again several times (waiting a reasonable time between the retries) before giving up when doing requests to external services.
Actions #1

Updated by okurz almost 2 years ago

  • Parent task set to #109818
Actions #2

Updated by jbaier_cz almost 2 years ago

Let's just wrap the thing into a global retry like in bot-ng to not waste time with the code: https://gitlab.suse.de/qa-maintenance/openQABot/-/merge_requests/93

Actions #3

Updated by okurz almost 2 years ago

  • Due date set to 2022-04-25
  • Status changed from New to Feedback
  • Assignee set to jbaier_cz
  • Target version set to Ready
Actions #4

Updated by livdywan almost 2 years ago

  • Status changed from Feedback to Resolved
Actions #5

Updated by okurz almost 2 years ago

  • Due date deleted (2022-04-25)
Actions

Also available in: Atom PDF