Update a batch of Project Import/Export relations to use AttributesPermitter & allow-list approach (merge request, project member, snippet)

Transition 5 small Project Import models to use AttributesPermitter & allow-list approach when Importing.

This will allow us to see if allow-list approach works as expected, if there are any issues that need to be fixed.

See https://gitlab.com/gitlab-org/gitlab/-/issues/37322 for reasons why.

Proposed list of models:

  • merge request
  • project member
  • snippet

Once completed, create a new issue to update the next batch of relations.

Implementation plan

  • backend Extend lib/gitlab/import_export/project/import_export.yml with new section that contains attributes that should be included for import:
included_attributes:
  merge_request
  project_member
  snippet:
Edited by Alan (Maciej) Paruszewski