Skip to content

Marks a catalog resource as `draft` if the release(s) is/are removed

Laura Montemayor requested to merge mark-catalog-resource-as-draft into master

What does this MR do and why?

Marks a catalog resource as draft if the release(s) is/are removed.

How to set up and validate locally

These changes will not show up in the UI, so verifying this will be done through the console.

  1. In a project marked as a catalog resource, create two releases if there aren't some already.
  2. In the console, set the state of the catalog resource to published.
=> #<Ci::Catalog::Resource:0x0000000154fbc7a0
 id: 13,
 project_id: 21,
 created_at: Thu, 24 Aug 2023 11:52:39.353194000 UTC +00:00,
 state: "published">
  1. Delete a single release (either through the UI or the console)
  2. Verify that the state of the catalog resource remains in published state
  3. Delete any remaining releases.
  4. Verify that the state of the catalog resource is now draft

<Ci::Catalog::Resource:0x0000000156e042f8 id: 13, project_id: 21, created_at: Thu, 24 Aug 2023 11:52:39.353194000 UTC +00:00, state: "draft">

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

#418996 (closed)

Edited by Laura Montemayor

Merge request reports