Check Blog MR approval before trying to approve on the Deploy service
Problem
As noted here, the MR approval API is not idempotent and will fail if you try to approve the same MR twice. This was leading to the inability to retry the Deploy Blog Post job.
Solution
We need to update DeployBlogPost
so we only run the approval if it is not already approved. The ApproveService
has logic that does this check: https://gitlab.com/gitlab-org/release-tools/-/blob/c30e0a150d303b4dd59d82ac786ed464eb22fc61/lib/release_tools/services/approve_service.rb#L37-39, but as noted here, that service is not compatible with the handbook project. But for now, we can at least look to it for how this check can work.
Implementation details
-
Adjust the approval
portion to be idempotent - If there is one approval, this section should be skipped - gitlab-org/release-tools!2722 (merged) -
Investigate why the merge train fails #19743 (comment 1619043540) / gitlab-org/release-tools!2722 (diffs, comment 1619258282) -
Fix the merge-train problem on the DeployBlogService
- gitlab-org/release-tools!2722 (merged) -
Test gitlab-org/release-tools!2722 (merged) -
Remove the branches from the handbook repo.
Edited by Mayra Cabrera