Execute metadata independent of the internal release process
When building internal packages, the metadata is collected and pushed to the metadata/release repository https://gitlab.com/gitlab-org/release-tools/-/blob/master/lib/release_tools/internal_release/release.rb#L28.
Since internal releases target the versions running on Dedicated instances (N-1 and N-2) two internal release packages will be created per internal release. These packages are concurrently executed via the downstream pipeline, so although separate commits, there is a risk both jobs try to commit to the metadata repository at the same time.
Ideas
(Implemented) Retry the API call
~~We can implement a retry on the API call, which is currently not retriable: ~~~~https://gitlab.com/gitlab-org/release-tools/-/blob/master/lib/release_tools/internal_release/metadata.rb~~
We discovered that the actual API call is already in a Retriable
block.
(Not Implemented) Separate the metadata actions to its dedicated job
This is a slightly more involved solution, if the retry doesn't work as intended. (Open the issue again, if we should attempt this idea)
We may want to consider separating the metadata actions from the release InternalRelease::Release
class https://gitlab.com/gitlab-org/release-tools/-/blob/master/lib/release_tools/internal_release/release.rb
Create a dedicated job on the internal release pipeline that is automatically executed after the internal_release_release_build_package:*
jobs and it is only focused on the metadata.
Exit Criteria
-
The API calls to create commits on the metadata repository do not conflict with each other