Allow transfer of project with registry tags
All threads resolved!
All threads resolved!
Compare changes
There are no changes yet
No changes between version 3 and version 3
In this MR, we start to allow the transfer of projects with registry tags given the following conditions:
transfer_project_with_tags
is enabledBefore the actual transfer, we also do a dry run of the command in the container registry API, and only if it succeeds will the transfer proceed, otherwise an error will be raised.
We use ContainerRegistry::GitlabApiClient.move_repository_to_namespace
which was the recently added in #475000 (closed).
redis-server --port 6380
)ProjectOne
from Subgroup A
to Subgroup B
which would be allowed. We will also try to move ProjectOne
to Group2
which would result to an error since Group2
is not in the same top-level namespace. Make sure that ProjectOne
has container images and tags so we can test this update Feature.disabled?(:transfer_project_with_tags)
# => true
# if the feature is enabled, you can disable it with:
Feature.disable(:transfer_project_with_tags)
Project cannot be transferred, because tags are present in its container registry
Feature.enabled?(:transfer_project_with_tags)
# => true
# if the feature is disabled, you can enable it with:
Feature.enable(:transfer_project_with_tags)
Transfer the project to another group within the same top level namespace in Settings > General > Advanced > Transfer project
It should be successful
Feature.enabled?(:transfer_project_with_tags)
# => true
# if the feature is disabled, you can enable it with:
Feature.enable(:transfer_project_with_tags)
Transfer the project to another group that is not within the same top level namespace in Settings > General > Advanced > Transfer project
There should be an error that it is not allowed to transfer projects with registry tags to a different top level namespace.
Related to #499163 (closed)
No changes between version 3 and version 3