Project

General

Profile

action #121228

Updated by okurz 5 months ago

https://progress.opensuse.org/issues/121228 
 qem-bot comments on IBS 

 ## Motivation 
 Spike solution #114415 has been finished, now it needs to be turned into a feature. 

 ## User Story 
 As a maintenance coordinator when submitting a release request for a maintenance update I want to be informed as soon as the IBS review group "qam-openqa" can not approve a request so that I do not need to wait or poll for updates or ping people in chat. 

 ## Acceptance criteria 
 * **AC1:** As soon as testing for an individual release request is finished and if there is at least one failing openQA test a comment is written in IBS linking to at least one failing test 
 * **AC2:** If there is no failing openQA test related to an individual release request no comment is written 
 * **AC3:** If there Only a single comment is already ever written on a release request (an existing comment by qem-bot nothing is added can be updated) 

 ## Suggestions 
 * Take a look how the openSUSE maintenance bot works in https://build.opensuse.org/request/show/989570#comment-1653374 
 * Look at the GitLab pipeline executing the bot: https://gitlab.suse.de/qa-maintenance/bot-ng/-/pipeline_schedules 
 * Within qem-bot we already have the feature to send out comments but it seems so far it does not look at the state of openQA jobs so it writes a comment for all release requests whenever triggered which means informing even about all currently running jobs. Maybe the next best task is to actually look at the state and only inform about failing openQA tests 
 * Think about moving the trigger point of sending a comment into the approval step of qem-bot or something so when no automatic approval is done instead a comment is written. This is where each individual release request should be looked at 
 * ~~Find out if OBS API supports editing comments, otherwise maybe delete old comments (https://build.opensuse.org/apidocs/)~~ OBS API has a [feature request for editing comments](https://github.com/openSUSE/open-build-service/issues/10178) 
 * Ensure that only a single comment is written, not multiple whenever qem-bot is called, so either update the existing or delete the old one if OBS does not support updating existing comments 
 * See what tinita already did with https://github.com/openSUSE/qem-bot/pull/92 
 * Consider adding a feature switch for the commenting feature so that we can easily enable/disable the functionality in one-time manual runs as well as in scheduled runs (see feature request proposed in https://github.com/openSUSE/qem-bot/pull/92) 
 * Consider extending the mocking tests/test_approve.py with mocking the OBS functionality 

 ## Out of scope 
 * Updating existing OBS comments as apparently updating is not currently possible over API, see [feature request for editing comments](https://github.com/openSUSE/open-build-service/issues/10178)

Back