Customize content export - #101
Conversation
|
@gforcada thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
|
@jenkins-plone-org please run jobs |
davisagli
left a comment
There was a problem hiding this comment.
The idea here looks ok but:
- needs a test
- needs docs
- what happens if there are other export steps that refer to content which was not included by this adapter?
33f45db to
15e9d21
Compare
✅ added
✅ added, see plone/documentation#2101
I added a warning on the docs, that as soon as you customize the export, it might be that you need to further fine tune the other exporters. Given that this is not the default and you have to create the adapter and override it etc. I would expect that if you know how to do that, you can deal with a maybe(?) broken export, but that's what you coded, so it's up to you to deal with it. |
@gforcada Have you tried to use this already with your own IObjectsExporter adapter override? I guess I'm okay being a little hand-wavy about this, but I'd like to make sure that it at least serves your needs before we lock in the interface. |
|
@davisagli yes, we are using it already. Our idea is to export on a daily/weekly basis a subset of the production website, so that within a ~1Gb worth of data we have a good enough website to develop/debug locally 🌟 In our use case, we ignore comments, so there is no problem of a comment being from a non-existing object and relations that do not exist only log an error rather than fail the import process. Same goes, though I haven't double checked, with redirects (which we might remove from the subset as well). So yes, it works for us, and being an import/export system, not something that it runs while your editors work on the website, if it's a little brittle because you modified it, then I'm expecting that you can also be responsible of fixing/adjusting things. That's what I tried to emphasize on the docs |
|
@gforcada Ok, +1 from me then. I just wanted to avoid the situation where we release it and then discover it needs to be something different. |
|
@jenkins-plone-org please run jobs |
Part of #86
This changes are actually a no-op for regular users of
plone-exporterandplone-importercli tools.What this change allows is to customize on you own add-ons or policy products what should be exported when calling
plone-exporter.