Skip to content

Add GroupImportState to group imports

George Koltsov requested to merge georgekoltsov/add-group-import-state into master

What does this MR do?

This MR adds Group Import state created/started/finished/failed in order to better understand group import's process.

It is going to be utilized in:

  1. Group Import API - similar to Import status for projects https://docs.gitlab.com/ee/api/project_import_export.html#import-status
  2. Group Import UI - again, similar to Projects, when importing a group, the UI is going to shown Import In Progress until import is complete

I've added it as a has-many association, however it's impossible to re-initiate the import into the same group, as the way import works - it always creates a brand new group from scratch and then restores relations into it. It's a has-many association for potential future adjustments. I've added unique index on group_id and state to prevent multiple imports with the same state.

Project Import on the other hand is a has-one association with project_import_state, where the same row is being altered https://gitlab.com/gitlab-org/gitlab/blob/georgekoltsov/add-group-import-state/app/models/project_import_state.rb#L56-56 and erasing history.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading