Skip to content

Commit

Permalink
Read text data from details JSON if present
Browse files Browse the repository at this point in the history
This change is necessary due to changes on the openQA side. The text
file might not be available anymore. Its content is instead directly
incorporated into the details JSON document.

See https://progress.opensuse.org/issues/69058#note-1
  • Loading branch information
Martchus authored and okurz committed Jul 24, 2020
1 parent 30c728f commit 935b63b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion openqa_review/openqa_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,10 @@ def _get_bugref_for_softfailed_module(self, result_item, module_name):
details = details_json['details'] if 'details' in details_json else details_json
for field in details:
if 'title' in field and 'Soft Fail' in field['title']:
unformated_str = self.test_browser.get_soup('%s/file/%s' % (result_item['href'], quote(field['text']))).getText()
if 'text_data' in field:
unformated_str = field['text_data']
else:
unformated_str = self.test_browser.get_soup('%s/file/%s' % (result_item['href'], quote(field['text']))).getText()
return re.search('Soft Failure:\n(.*)', unformated_str.strip()).group(1)
elif 'properties' in field and len(field['properties']) > 0 and field['properties'][0] == 'workaround':
log.debug("Evaluating potential workaround needle '%s'" % field['needle'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"result": "unk"
},
"title": "Soft Failed",
"text": "zypper_info-4.txt"
"text": "zypper_info-4.txt",
"text_data": "# Soft Failure:\nfor Leap:15.0:Ports aarch64 and ppc64le, do not enable source repo, waiting for https://progress.opensuse.org/issues/36256 to be solved, and also http://fate.suse.com/12345 ✓"
}
]
2 changes: 0 additions & 2 deletions tests/tags_labels/:tests:684839:file:zypper_info-4.txt

This file was deleted.

0 comments on commit 935b63b

Please sign in to comment.