Add --catalog-publish argument
What does this MR do and why?
The new "--catalog-publish" argument will notify the release-cli that "this release is a catalog resource so send legacy_catalog_publish as true if you want to publish this release". In the future, release-cli will still use this flag but then it will not send the legacy_catalog_publish parameter. Instead, it will call the catalog resource endpoint separately.
- GitLab MR for more information: gitlab!146198 (merged)
- GitLab Issue for more information: gitlab#442066 (closed)
After rolling out the new version of release-cli
and rollout the FF, we'll have this scenario;
- GitLab does send the
--catalog-publish
parameter to RCLI. - RCLI does send the
legacy_catalog_publish
parameter astrue
to GitLab. - GitLab does publish the catalog.
Then, we aim to do these;
- We'll move some heavy calculations logic from
Ci::Catalog::Resources::ReleaseService
torelease-cli
. - We'll create an endpoint to call a new version of
Ci::Catalog::Resources::ReleaseService
specifically without those heavy calculations. (Today, that service is called inside ofReleases::CreateService
) - We'll implement this logic to
release-cli
;- When
--catalog-publish
is passed;- When creating the release, do not send the
legacy_catalog_publish
parameter astrue
to GitLab anymore.; - After creating the release;
- run some heavy calculations logic and call the new API endpoint to publish the release to the catalog.
- When creating the release, do not send the
- When
- We'll release a new version of
release-cli
with these changes. Our existing API ofReleases::CreateService
behaves differently according to thelegacy_catalog_publish
parameter for the old and new release-cli versions.
Checklist
-
I added tests -
Green pipeline -
Assign to reviewer
Edited by Furkan Ayhan