Project

Profile

Help

Task #1220

closed

Refactor #765: Convert Pulp to use MongoEngine

Document that migrations should use PyMongo directly and never use model code

Added by bmbouter about 9 years ago. Updated over 5 years ago.

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 #1

Updated by bmbouter about 9 years ago

  • Tracker changed from Issue to Task
  • Subject changed from mongoengine model pre_save signals don't work in pulp-manage-db to Document that migrations should use PyMongo directly and never use model code
  • Description updated (diff)
  • Groomed set to No
  • Sprint Candidate set to Yes
  • Tags Documentation added

Rewritten to get more to the point that migrations should never use models and we should document this.

Actions #2

Updated by bmbouter about 9 years ago

  • Description updated (diff)
Actions #3

Updated by mhrivnak over 8 years ago

  • Sprint Candidate changed from Yes to No
Actions #4

Updated by bmbouter over 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #5

Updated by bmbouter over 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #6

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF