Actions
action #97955
closed[openqabot] Possible TypeError during execution "'NoneType' object is not subscriptable"
Start date:
2021-09-02
Due date:
% Done:
0%
Estimated time:
Description
Observation¶
An error during qa-maintenance/openQABot execution, possible a bad data from SMELT API.
Failed job: https://gitlab.suse.de/qa-maintenance/openQABot/-/jobs/556824
$ /usr/bin/oqaqambot --verbose $BOT_PARAMS 2>&1 | tee openqabot.log
Traceback (most recent call last):
File "/usr/bin/oqaqambot", line 11, in <module>
load_entry_point('openQABot==0.3.0', 'console_scripts', 'oqaqambot')()
File "/usr/lib/python3.6/site-packages/openqabot/main.py", line 18, in main
sys.exit(run_bot(logger, args, sys))
File "/usr/lib/python3.6/site-packages/openqabot/main.py", line 41, in run_bot
return OpenQABot(metadata, args)()
File "/usr/lib/python3.6/site-packages/openqabot/openqabot.py", line 88, in __init__
self.mrs = MR(args.smelt, args.base_url, args.commenter)()
File "/usr/lib/python3.6/site-packages/openqabot/update/mr.py", line 23, in __call__
return self._get_mr_data()
File "/usr/lib/python3.6/site-packages/openqabot/update/mr.py", line 137, in _get_mr_data
ids = self._get_mr_ids()
File "/usr/lib/python3.6/site-packages/openqabot/update/mr.py", line 93, in _get_mr_ids
for x in ndata["data"]["requests"]["edges"]
TypeError: 'NoneType' object is not subscriptable
Suggestions¶
- Explore GraphQL query in update/mr.py
- Improve error reporting to include reference to invalid incident
- Handle missing data gracefully
Actions