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

Sustainable exports, part 1 #40

Closed
wants to merge 3 commits into from

Conversation

mauritsvanrees
Copy link
Member

See issue #36 and #39.

  • Export principals: I saw roles in a different order when exporting a second time, so now we sort them. Same for groups.
  • Do not export the parent info, this is not needed. Instead, use the path of the item, and get the parent path. This makes the export shorter.
    • Possible downside: if you are using this to do partial imports, and you have renamed the parent folder, then you can no longer find it. Previously, you could still find the renamed parent via its UID.
    • Possible upside: you can then manually create a matching folder structure, and do an import, without needing to somehow change the UID of the manually created folder.
    • Both those points are irrelevant though for the main use case of creating a new site using a distribution.
    • I guess we could make this optional: by default do not export the parent info, but allow exporting it using a command line argument, and then still use the parent info during import.
  • Import: set the modified (and created) dates again at the end. In the content importer they are already set correctly during import of an item. But importing a child item may change the modified date of a parent folder. And the relations importer may also change the modified date of an item. So at the end of the importers list, we add a contentfinal importer which sets the modified date again. Note that this rereads all content json files.

@mister-roboto

This comment was marked as resolved.

@mauritsvanrees
Copy link
Member Author

Note that testing on Jenkins is currently useless for this package. Locally in buildout.coredev:

$ bin/test -s plone.exportimport
Total: 0 tests, 0 failures, 0 errors, 0 skipped in 0.000 seconds.

See also plone/buildout.coredev#978

@mauritsvanrees
Copy link
Member Author

This is now a PR with three related, but separate fixes. Let me split this into multiple PRs for easier reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants