Skip to content
代码片段 群组 项目
提交 7878161a 编辑于 作者: Furkan Ayhan's avatar Furkan Ayhan 提交者: Leaminn Ma
浏览文件

Defer CI catalog publish decision to release-cli

We will be changing how catalog publishing works by moving
the metadata processing and publishing to release-cli.
In our ideal case, `Releases::CreateService` should not run
`Ci::Catalog::Resources::ReleaseService` and this should be in
a separate endpoint. And in the future, we'll also change the catalog
publishing service because we don't want to calculate the metadata
on the server side.

To this end, we are deferring the catalog publish decision to
release-cli;

- If release-cli sends `legacy_catalog_publish` true, then
`Releases::CreateService` publishes the catalog resource.
- Otherwise, it does not publish the catalog.
It only creates the release.

In this MR, we are adding the new `legacy_catalog_publish` parameter
to the `/releases` API endpoint. Then, we are using it in
`Releases::CreateService` to decide publishing the catalog resource.

We are also starting to send the `--catalog-publish` CLI option to
release-cli. This 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.

These changes are behind the FF `ci_release_cli_catalog_publish_option`.
We'll use this FF to control this change to prevent breaking changes.
上级 4a0ea7dd
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册