Skip to content

Extract shared logic from RelationFactory & ObjectBuilder

George Koltsov requested to merge georgekoltsov/relation_factory_refactor into master

What does this MR do?

This MR is part of a bigger MR !19560 (closed) that introduces Group Import functionality (similar to Project Import what we have today). Mentioned MR is going to be split into multiple MRs in order to make it easier to review and merge.

This MR extracts RelationFactory functionality into a new class BaseRelationFactory and renames existing class into ProjectRelationFactory in order to be used in a new GroupRelationFactory that is going to be added in a future MR. It's done in order to share as much functionality as possible with Project Import & reduce duplication, since the process of Import for both project & group are more or less the same.

Similarly, it extracts shared logic from GroupProjectObjectBuilder into BaseObjectBuilder, in order to add GroupObjectBuilder in the future MR.

RelationFactory subclasses are meant to setup their own specific models (like builds for Project models).

ObjectBuilder subclasses are meant to define where clauses, and adjust attributes when object needs to be created (like with labels for Project)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

N/A

Security

N/A

Edited by 🤖 GitLab Bot 🤖

Merge request reports