Optimized sync with mirror set to true unassociates all content units and creates an empty repository version
Syncing a repository with Optimized sync set to true and mirror set to true unassociates all content units and creates an empty repository version. The progress report looks like the attached image. The first sync works fine. The subsequent sync removes all content units.
It seems to happen because the mirror implementation from the pulpcore is used which is unaware of the RPM specific
optimize option which does not add any content to a new incomplete repo version.
- have custom implementation of
DeclarativeVersion.createin the plugin
- have plugin input in the pulpcore when deciding whether to add the content unassociation step or not
- add existing content to the incomplete repo version, so it would be clear that content is there and there is just nothing to remove because it's the same.
- anything else?
I looked over the optimize_sync code and I recommend moving it out of RpmFirstStage and into the task code called before DeclarativeVersion.create() is even called. This will cause the pipeline never to start. From an efficiency perspective since no DeclarativeContent is emitted down the pipeline there is no concurrency opportunity so handling that synchronously earlier in the code should be the same from an efficiency perspective.
Please register to edit this issue