Project

Profile

Help

Story #934

Task #1014: Short Term Improvements for Pulp's use of MongoDB

Update mongoengine dependency to 0.9

Added by bcourt over 5 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.7.0
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
June 2015
Quarter:

Description

After mongoengine 0.9 is released we should update the Pulp dependency from 0.7.10 to 0.9 across all our platforms.

Deliverables:

  • Spec file updates for base dependency
  • pulp/server/pulp/server/db/manage.py:ensure_database_indexes() is updated to only use the Document.ensure_indexes() method
  • pulp/server/pulp/server/db/model/base.py:update_one() is removed

Related issues

Blocks Pulp - Issue #1089: pulp status call returning ISE 500 CLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 333e73cb View on GitHub
Added by bmbouter over 5 years ago

Adds pymongo 2.7.2 and mongoengine 0.9.0

The pymongo spec file skips tests that require a running instance of mongodb. I manually ran the tests against a running instance once and they all passed for me. If we ever configure the builder with a running instance of mongodb we can delete the --exclude list in the pymongo spec file.

Updates pulp.server.db.manage:ensure_database_indexes() to only use the Document.ensure_indexes() method.

Removes pulp.server.db.model.queryset:update_one() which was here for 0.7.10 compatability.

This also updates all tests to run correctly when the test runner has mongoengine==0.9.0 and pymongo==2.7.2 installed.

Test server.managers.repo.test_cud:test_update_repo_and_plugins is removed altogether. I don't know why it was failing after upgrading the deps, but when I downgrade the deps back to mongoengine 0.7.10 and pymongo 2.5.3 it passed. It's safe to remove altogether here because it has completely been removed and rewritten with #1931.

https://pulp.plan.io/issues/934 fixes #934

Revision 333e73cb View on GitHub
Added by bmbouter over 5 years ago

Adds pymongo 2.7.2 and mongoengine 0.9.0

The pymongo spec file skips tests that require a running instance of mongodb. I manually ran the tests against a running instance once and they all passed for me. If we ever configure the builder with a running instance of mongodb we can delete the --exclude list in the pymongo spec file.

Updates pulp.server.db.manage:ensure_database_indexes() to only use the Document.ensure_indexes() method.

Removes pulp.server.db.model.queryset:update_one() which was here for 0.7.10 compatability.

This also updates all tests to run correctly when the test runner has mongoengine==0.9.0 and pymongo==2.7.2 installed.

Test server.managers.repo.test_cud:test_update_repo_and_plugins is removed altogether. I don't know why it was failing after upgrading the deps, but when I downgrade the deps back to mongoengine 0.7.10 and pymongo 2.5.3 it passed. It's safe to remove altogether here because it has completely been removed and rewritten with #1931.

https://pulp.plan.io/issues/934 fixes #934

Revision b5f2daff View on GitHub
Added by bmbouter over 5 years ago

Fixes mongoengine model usage that did not have kwargs

The upgrade to mongoengine 0.9.0 revealed that parts of the Pulp codebase which used mongoengine models did not specify kwargs. This raises an exception (as it should) in mongoengine 0.9.0.

I audited the existing models on 2.7-testing, fixed those, and I updated the tests to match.

re #934 https://pulp.plan.io/issues/934

Revision b5f2daff View on GitHub
Added by bmbouter over 5 years ago

Fixes mongoengine model usage that did not have kwargs

The upgrade to mongoengine 0.9.0 revealed that parts of the Pulp codebase which used mongoengine models did not specify kwargs. This raises an exception (as it should) in mongoengine 0.9.0.

I audited the existing models on 2.7-testing, fixed those, and I updated the tests to match.

re #934 https://pulp.plan.io/issues/934

History

#1 Updated by rbarlow over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to rbarlow
  • Groomed set to No
  • Sprint Candidate set to No

#2 Updated by dkliban@redhat.com over 5 years ago

  • Parent task set to #1014
  • Platform Release set to 2.7.0

#3 Updated by rbarlow over 5 years ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (rbarlow)

I've been reassigned to other work.

#4 Updated by bmbouter over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#5 Updated by bmbouter over 5 years ago

  • Status changed from ASSIGNED to POST
  • Sprint/Milestone set to 17

#6 Updated by dkliban@redhat.com over 5 years ago

  • Blocks Issue #1089: pulp status call returning ISE 500 added

#7 Updated by bmbouter over 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#8 Updated by bmbouter over 5 years ago

QE, to test this please ensure that when you do an install of pulp-server 2.7.0 that the following dependencies are installed:

mongoengine == 0.9.0
pymongo == 2.7.2

Also please ensure that an upgrade from 2.6.x -> 2.7.0 installs the new dependencies as well.

#9 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to 5

#10 Updated by bmbouter over 5 years ago

The additional PR for this is: https://github.com/pulp/pulp/pull/1964

#11 Updated by igulina@redhat.com over 5 years ago

  • Status changed from 5 to 6

After update from 2.6.2 to 2.7.4:

>> rpm -qa *mongoengine*
python-mongoengine-0.9.0-1.el7.noarch
>> rpm -qa *pymongo*
python-pymongo-gridfs-2.7.2-1.el7.x86_64
python-pymongo-2.7.2-1.el7.x86_64

Installing 2.7.4:


(34/51): python-mongoengine-0.9.0-1.el7.noarch.rpm                               | 420 kB  00:00:01     
...
(45/51): python-pymongo-gridfs-2.7.2-1.el7.x86_64.rpm                            |  86 kB  00:00:00 
...
(49/51): python-pymongo-2.7.2-1.el7.x86_64.rpm                                   | 251 kB  00:00:01 
...
Installing : python-pymongo-2.7.2-1.el7.x86_64                                                  19/51 
Installing : python-pymongo-gridfs-2.7.2-1.el7.x86_64                                           20/51
Installing : python-mongoengine-0.9.0-1.el7.noarch                                              21/51 
...

Verifying  : python-pymongo-gridfs-2.7.2-1.el7.x86_64                                           14/51 
...
Verifying  : python-pymongo-2.7.2-1.el7.x86_64                                                  23/51 
...
Verifying  : python-mongoengine-0.9.0-1.el7.noarch                                              26/51 

...
>> rpm -qa *pymongo*
python-pymongo-gridfs-2.7.2-1.el7.x86_64
python-pymongo-2.7.2-1.el7.x86_64

>> rpm -qa *mongoengine*
python-mongoengine-0.9.0-1.el7.noarch

#12 Updated by amacdona@redhat.com almost 5 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#14 Updated by bmbouter over 2 years ago

  • Sprint set to June 2015

#15 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (17)

#16 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF