Skip to content

Display time until next package cleanup

Tristan Read requested to merge tr-add-package-settings-cleanup-message into master

What does this MR do and why?

Package & registry project settings: Adds a message showing the time until the next scheduled cleanup when present.

Do not display any message if nextRunAt time is not set. Upon submission refetch the settings query and update message.

issue: #379028 / #378342 and discussion confirming the logic.

After further discussion we decided its good to show a different message when cleanup policy is ready to be executed.

Screenshots or screen recordings

When cleanup policy is set, shows highlighted message. Screenshot_2023-01-18_at_12.42.56_am

When cleanup policy is ready to be executed, shows different message Screenshot_2023-02-02_at_12.46.29_pm

How to set up and validate locally

  1. Visit Project > Settings > Packages and registries page
  2. If highlighted message does not appear then policy has not been set.
  3. Choose a value from the Number of duplicate assets to keep select and click Save changes
  4. The highlighted message should now appear with duration for cleanup.
  5. To test message which informs cleanup policy is ready to be executed change the update function to:
    update: (data) => { 
      return {
        ...data.project?.packagesCleanupPolicy,
        nextRunAt: new Date().toISOString(),
      } || {}; 
    },

MR acceptance checklist

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

Edited by Rahul Chanila

Merge request reports