Retry button if there are failed status checks
This is a followup from the discussion in this thread &8516 (comment 1173353507)
I feel like we should have a way to force a re-check without having to make a change. Like a button beside the check to re-run the check. We currently use something like that for site validation for DAST profiles. As a first iteration, that would make this a lot more useable when the checks are blocking an MR.
Yes, we will need backend work. Outside of the 3 actions mentioned in the doc, we currently have no way of triggering the webhook that informs the external service to run a check, so we need a new API endpoint for it.
Here is the figma link to the designs
Regarding the
Retry
button, we'll need to work with Foundations to make sure we're using the merge report framework correctly. For example, would you expect to seeRetry
on each individual failed check (theGitBot
example posted above), or should it only be on the top level (ie 2 failed status checks - Retry all failed checks)
backend Create an API to retry the failed status check.
Purposed Implementation Plan
weight:
- Create post api
/api/v4/projects/:id/merge_requests/:merge_request_iid/status_checks/:check_id/retry
Example curl
curl --location --request POST 'curl --location --request POST 'http://BASE_URL//api/v4/projects/6/merge_requests/4/status_checks/1/retry' \
--header 'Authorization: ACCESS_TOKEN' \
--data-raw '''
- User
merge_request.to_hook_data(current_user)
to generate current state payload - Async post this data payload to status checks url
- Write Specs
frontend A button to call the retry API from the MR widget