Skip to content

Add --catalog-publish argument

Furkan Ayhan requested to merge catalog-publish-option into master

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.


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 as true to GitLab.
  • GitLab does publish the catalog.

Then, we aim to do these;

  1. We'll move some heavy calculations logic from Ci::Catalog::Resources::ReleaseService to release-cli.
  2. 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 of Releases::CreateService)
  3. 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 as true 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.
  4. We'll release a new version of release-cli with these changes. Our existing API of Releases::CreateService behaves differently according to the legacy_catalog_publish parameter for the old and new release-cli versions.

Checklist

  • I added tests
  • Green pipeline
  • Assign to reviewer
Edited by Furkan Ayhan

Merge request reports