Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DTS] Only delete types of data that are being transferred #17730

Merged
merged 17 commits into from
Aug 28, 2023

Conversation

innerdvations
Copy link
Contributor

@innerdvations innerdvations commented Aug 21, 2023

What does it do?

Update the import and transfer commands to generate the correct restore object

TODO:

  • add more tests
  • refactor restore logic so it's modular and independent from local-source I'm skipping this one because it would be a big structural change that might break things*
  • I think we first need a discussion about if it would make more sense to make local-source a wrapper for a local-restore-source rather than local-source using strategies, since the strategies are/will be so tightly integrated it may be difficult to abstract them

Why is it needed?

The initial functionality of the restore strategy causing a global reset of Strapi data caused too many users to be confused.

The updated functionality of only touching data included in a transfer matches user expectations to not touch files that are excluded in a transfer or import.

How to test it?

Using exclude or only with transfer or import should now only delete the files that are included in the process.

Related issue(s)/PR(s)

Closes #17572

Completes DX-862, DX-863, DX-864

@innerdvations innerdvations self-assigned this Aug 21, 2023
@innerdvations innerdvations added pr: fix This PR is fixing a bug source: core:data-transfer Source is core/data-transfer package labels Aug 23, 2023
Copy link
Member

@Bassel17 Bassel17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, tested it as well

Bassel17

This comment was marked as duplicate.

Copy link
Contributor

@christiancp100 christiancp100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Bassel17 Bassel17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@christiancp100 christiancp100 merged commit ce51df0 into main Aug 28, 2023
55 of 57 checks passed
@derrickmehaffy derrickmehaffy deleted the fix/exclude-only-acts-also-on-restore branch August 28, 2023 18:14
@alexandrebodin alexandrebodin modified the milestones: 4.13.0, 4.13.1 Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:data-transfer Source is core/data-transfer package
Projects
Status: To be reviewed (Open)
Development

Successfully merging this pull request may close these issues.

Data export with --exclude files will still delete/backup files on import with the same flag, links lost
5 participants