Branch retention

Branches that have no activity after a certain number of days are automatically marked as Inactive and later automatically Closed. When branches that are not deployed to the Main branch are closed, their resources are deleted in a process known as "de-indexing" to reduce the cost of branches.

If one of your branches has been marked as Inactive, you will receive both an email notification and an in-platform notification. You can view branches marked as Inactive in the Branches tab of the Foundry Branching application and in your individual branch view.

To move the branch back into the Active status, you can choose from either of the following options:

  • Manually remove the Inactive label on the branch. You can only do this if you are the owner of that branch.
  • Continue work on your branched resources and deploy changes or additions to your branch. The branch status will update automatically. This can be as simple as changing the name of the branch itself.

In Control Panel, you can set the duration after which branches are considered inactive, and at what point the branch should be automatically closed for each Space. Navigate to Control Panel > Spaces > Actions > Foundry branch retention policy to view and edit the configurations under the Spaces section.

Branch retention options related to Foundry branch retention policies.

By default, these values are set at 7 days of inactivity to update a branch from Active to Inactive and 28 days of inactivity to update a branch from Inactive to Closed. Foundry Branching runs a retention task every hour to determine what actions to take on branches that qualify for retention actions.

The possible set of actions that can be automatically applied to branches are as follows. Branches can automatically be:

  • Marked as Inactive after a period of no changes to an Active branch.
  • Marked as Active again if changes are observed on an Inactive branch.
  • Marked as Closed after a period of no changes to an Inactive branch.
Closed branches cannot be reopened

Once a branch is Closed, it is not possible to reopen it, so this is the terminal state for the user. Seven days after a branch has been in the Closed or Merged state, its leftover data will be deleted by jobs running in foundry-retention. The ability to reopen a closed branch is currently in development.

The ability to view Foundry branching costs in the Resource Management application is in development.