Actions
Task #1220
closedRefactor #765: Convert Pulp to use MongoEngine
Document that migrations should use PyMongo directly and never use model code
Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:
Description
Using any kind of model (mongoengine or not) in a migration is problematic. Models change over time, but migrations should always remain the same. This task is to document that migrations should use PyMongo directly and never use a model of any kind.
In addition to the maintainability problem, mongoengine models don't even work as expected because the save() handler won't work as it does in other parts of the code. Normally save() moves files into place and in the puppet case calculates checksums, but at pulp-manage-db time none of those things work because the PluginManager isn't instantiated prior to the models running.
Actions