Skip to content

Add project attributes migration to GitLab Migration

George Koltsov requested to merge georgekoltsov/migrate-project-attributes into master

What does this MR do and why?

Mentions #339416 (closed)

this feature is behind bulk_import_projects feature flag that is currently off by default (and disabled on .com).

This MR adds Project Properties migration when using Group Migration that includes projects (https://docs.gitlab.com/ee/user/group/import/). Similar to other MRs from this series. This is suppose to work identical to file-based Project Import/Export.

List of migrated attributes:
description
visibility_level
archived
merge_requests_template
merge_requests_rebase_enabled
approvals_before_merge
reset_approvals_on_push
merge_requests_ff_only_enabled
issues_template
shared_runners_enabled
build_coverage_regex
build_allow_git_fetch
build_timeout
pending_delete
public_builds
last_repository_check_failed
only_allow_merge_if_pipeline_succeeds
has_external_issue_tracker
request_access_enabled
has_external_wiki
ci_config_path
only_allow_merge_if_all_discussions_are_resolved
printing_merge_request_link_enabled
auto_cancel_pending_pipelines
service_desk_enabled
delete_error
disable_overriding_approvers_per_merge_request
resolve_outdated_diff_discussions
jobs_cache_index
external_authorization_classification_label
pages_https_only
merge_requests_author_approval
merge_requests_disable_committers_approval
require_password_to_approve
remove_source_branch_after_merge
autoclose_referenced_issues
suggestion_commit_message

Screenshots or screen recordings

https://monosnap.com/file/h448vZGEhcldMt6NXqlqcYHJ2OMRID (recording is more than 10mb is size so could not upload it as an attachment).

How to set up and validate locally

  1. Feature.enable(:bulk_import).
  2. Feature.enable(:bulk_import_projects).
  3. Create a top level group and project in it.
  4. Update project attributes on general settings page
  5. Go to /groups/new#import-group-pane page and enter instance url and access token (needs to be api & read_repository scope).
  6. Select newly created group and click Import.
  7. Wait for Group import to complete and verify imported settings. They should be present and their values should be preserved.

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 George Koltsov

Merge request reports