Update the registry gitlab v1 API client
🍌 Context
There is an ongoing migration on the Container Registry side to migrate data to a database.
That migration is driven by the rails backend which basically sends which container images have to be migrated.
The interactions between the two backends is mainly through a shiny new API that has been implemented on the Container Registry side. For example, we have this endpoint that starts the different migration steps.
In !78452 (merged), we added a new client object for that API: gitlab_api_client
.
In #351865 (closed), we discovered that made a mistake in the API urls that are called. We need a /
at the end of the url.
Without that /
, the Container Registry API will reply a redirect pointing to the url version with a final /
.
This redirect is unnecessary as the rails backend can directly build the right url format and use it. That's what this MR does.
Last piece of context, this whole migration process is strictly scoped to gitlab.com for now and is heavily behind feature flag.
The client updated by this MR has been added in %14.8. As such, I will categorize this MR as typemaintenance than anything else. It contains minor updates for the gitlab_api_client
.
🔬 What does this MR do and why?
- When using the Import Repository use a
/
at the end of the url to avoid a redirect. - Allow
gitlab_api_client
to configure thefaraday
connection.- The shiny new API works mainly with json representations.
- Cleanup the related spec. There were some duplications. The spec was updated with the above changes.
🖼 Screenshots or screen recordings
n / a
🔨 How to set up and validate locally
🚥 MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.