Refactor JSON reader/writer for import/export
What does this MR do?
This is done to make it easy to use this structure for .ndjson
: &2734 (comment 308466773)
Overall this MR introduces the following changes:
- adds
allowed_path
to strong validateLegacyReader
andLegacyWriter
- does not change any of todays behaviour for data serialization
- makes the interface for reader and writer to accept
importable/exportable_path
that will be used byndjson
to store data in separate files - moves consuming of attributes outside of the relation tree restorer to ease the way how we process them
- splits specs for
LegacyReader::User/File
and introduces shared example for that: this is also the majority of changes introduced by this MR in order to move them - slightly code-formats and re-organises group and project import/export
This is done to be able to implement the following data structure for project
and group
exports,
but continuing to support legacy format for time being in a same way for PROJECT-only:
/tree/project.json
/tree/project/merge_requests.ndjson
/tree/project/services.ndjson
/tree/groups.ndjson
/tree/groups/100/epics.ndjson
/tree/groups/200/epics.ndjson
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 🤖