Conversation
Motivation Parallel execution of openqa-investigate results in crashes when attempting to delete job comments that either do not exist (404) or lack permission (403). Design Choices Implemented ignore_status parameter in _run_openqa_cli to catch and swallow HTTP 403 and 404 errors during openqa-cli execution. Extracted a helper function to keep McCabe complexity low, and normalized parameter annotations. Benefits Enhances robust parallel execution of job comment cleanup and prevents unnecessary job crashes while maintaining detailed error output for unhandled API issues. Related issue: os-autoinst#718
|
When I checked yesterday, the comment in question did still exist and was by geekotest, so why would there be a 403? edit: hm, according to the audit log you deleted the comment yesterday. I think ignoring 403 won't solve anything. Then we can just remove the code that tries to delete comments. Wasn't the problem rather that users can't delete their own comments? |
perlpunk
left a comment
There was a problem hiding this comment.
See my comment, I think we should clarify first
Yes, first I thought so as well. But then why would we only see a sporadic problem? I think I will try with another test account with different permission level |
|
Thought about it and decided for a change in openQA. Closing this PR in favor of the upstream openQA change (os-autoinst/openQA#7875) which allows comment authors to delete their own comments directly. Since these scripts are most likely only deployed on our continuously updated openQA instances, the upstream fix is the cleanest solution and avoids needing error-swallowing workarounds here. |
Motivation
Parallel execution of openqa-investigate results in crashes when attempting
to delete job comments that either do not exist (404) or lack permission (403).
Design Choices
Implemented ignore_status parameter in _run_openqa_cli to catch and swallow
HTTP 403 and 404 errors during openqa-cli execution. Extracted a helper function
to keep McCabe complexity low, and normalized parameter annotations.
Benefits
Enhances robust parallel execution of job comment cleanup and prevents
unnecessary job crashes while maintaining detailed error output for unhandled
API issues.
Related issue: #718