Skip to content

Unarchive all descendants on group unarchive

Consider the following situation:

  1. A project/subgroup is archived.
  2. Its parent group is archived and then unarchived

Currently, the descendant project/subgroup remains archived on the unarchiving of the parent group, but as discussed here &19690 (comment 2837069265), we should unarchive all the descendants when a group is unarchived.

Implementation

In the Groups::UnarchiveService, when unarchiving a group, we need to check all the descendant projects and groups that are marked as archived and mark them as unarchived in batches. After we've unarchived all the descendants, we'll mark the group as unarchived.

We can currently do this in the service itself, i.e. the API request, because we don't expect too many such groups/projects. We can move this to a Sidekiq worker in the future if required.

Edited by 🤖 GitLab Bot 🤖