Component version cleanup

Deployment Automation cleans up the contents of component versions automatically, based on the rules you define in the administration timeline.

Cleaned up versions are displayed as inactive and archived in the user interface, and their content is permanently removed from the repository.

By default, the cleanup runs every 24 hours. For details on how to set your own cleanup schedule, see Schedule version cleanup.

You set the following cleanup parameters for keeping version content:

Parameters Description
Days to Keep Versions

Number of days to keep version content after the versions are created.

Example: A version was created on July 1. If Days to Keep Version is set to 30 days, the version's contents are stored at least until July 30.

Number of Versions to Keep Number of versions for the current component to keep, ordered in reverse order. After a new version is created and cleanup is started, the contents of the oldest version are in line for removal.

There are multiple levels at which you may set the cleanup parameters. They are evaluated in ascending order of priority:

1 System level Settings for these parameters can be found in System Settings. Accepted parameter values are “-1” or “integer greater than 0”.
2 Component level

Settings for these parameters can be found when you edit a component.

To enable them, clear the Inherit Cleanup Settings option. Accepted parameter values are “-1”, “0”, or “integer greater than 0”.

By default, component-level settings are not selected for each component.

3 Environment level

Settings for these parameters can be found when you edit an environment at the application level.

To enable them, clear the Inherit Cleanup Settings option. Accepted parameter values are “-1”, “0”, or “integer greater than 0”.

By default, environment-level settings are not selected for each environment.

The cleanup procedure starts with retrieving all components from the database and looping through their versions in descending order.

Every version is evaluated as follows:

Step 1

What values of Days to Keep Versions and Number of Versions to Keep to use for this version?

  1. Initial parameter values are set to be equal to system-level values.
  2. If the component overrides at least one of these values with a non-zero value,  use both of them from the component level instead.
  3. Get a list of environments that ever had this version used in a process request.
  4. Iterate them sequentially. If an environment has cleanup parameters overridden, use the following criteria:

    1. For Days to Keep Versions parameter, extend the amount of days to the environment level value, if needed.

    2. For Number of Versions to Keep, save the environment level value for later use.

Step 2

Sequentially check this version against the set of rules. If, according to a rule, the version must be kept, its contents are not deleted.

  1. If either Days to Keep Versions and Number of Versions to Keep is set to “-1”, keep the version.
  2. If both Days to Keep Versions and Number of Versions to Keep is set to “0”, keep the version.
  3. If this version fits the “days to keep version” rule, in that the specified amount of days has not yet passed, keep the version.
  4. If this version fits the “number of versions to keep” rule, in that the version index is less than specified number of versions to keep, keep the version.
  5. If this version has active inventory, keep the version.
  6. If this version fits the “number of versions to keep” on some environment as determined in the previous pass, in that the version index is less than the specified number of versions to keep for this environment, keep the version.

Back to top

See also: