Project

Profile

Help

Issue #1393

closed

Failing unit tests after fc23 update

Added by semyers over 8 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Master
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/pulp/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/home/vagrant/devel/pulp/server/test/unit/server/db/migrations/test_0015_load_content_types.py", line 96, in test_migrate
    self.assertEqual(indexes['attribute_1_1_attribute_2_1_attribute_3_1']['dropDups'], False)
KeyError: 'dropDups'
Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/pulp/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/home/vagrant/devel/pulp/server/test/unit/server/db/test_manage.py", line 351, in test_pulp_manage_db_loads_types
    self.assertEqual(indexes['attribute_1_1_attribute_2_1_attribute_3_1']['dropDups'], False)
KeyError: 'dropDups'

dropDups was deprecated in 2.6 but removed in 2.7, but it looks like we don't use it, and probably don't actually need to check for it...

https://www.compose.io/articles/mongodb-2-6-indexing-improvements-things-worth-knowing/#dropdupsdeprecated

Added by semyers over 8 years ago

Revision aad4d3a9 | View on GitHub

drop checks for dropDups

The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].

The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.

dropDups only comes into play if it's explicitly requested, which we never do.

https://pulp.plan.io/issues/1393

fixes #1393

Added by semyers over 8 years ago

Revision aad4d3a9 | View on GitHub

drop checks for dropDups

The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].

The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.

dropDups only comes into play if it's explicitly requested, which we never do.

https://pulp.plan.io/issues/1393

fixes #1393

Actions #1

Updated by semyers over 8 years ago

We do specify dropDups in one place[0], but set it to False, which is the default[1] and has been the default since at least mongo 2.2[2]. Given its deprecation, the best thing to do is just take it out.

[0]: https://github.com/pulp/pulp/blob/9396e2256ca4977a0854b30d84dd348d0217b6ec/server/pulp/plugins/types/database.py#L302
[1]: https://docs.mongodb.org/v2.6/reference/method/db.collection.ensureIndex/
[2]: https://docs.mongodb.org/v2.2/reference/method/db.collection.ensureIndex/

Actions #2

Updated by semyers over 8 years ago

  • Status changed from NEW to POST
Actions #3

Updated by semyers over 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #4

Updated by semyers over 8 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by mhrivnak over 8 years ago

  • Platform Release set to 2.8.0

Added by semyers over 8 years ago

Revision a27aa207 | View on GitHub

drop checks for dropDups

The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7.

The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.

dropDups only comes into play if it's explicitly requested, which we never do.

https://pulp.plan.io/issues/1393

fixes #1393

Added by semyers over 8 years ago

Revision a27aa207 | View on GitHub

drop checks for dropDups

The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7.

The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.

dropDups only comes into play if it's explicitly requested, which we never do.

https://pulp.plan.io/issues/1393

fixes #1393

Added by semyers over 8 years ago

Revision c54ba8f0 | View on GitHub

drop checks for dropDups

The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].

The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.

dropDups only comes into play if it's explicitly requested, which we never do.

https://pulp.plan.io/issues/1393

fixes #1393

Added by semyers over 8 years ago

Revision c54ba8f0 | View on GitHub

drop checks for dropDups

The upgrade to fedora 23 revealed that the 'dropDups' property of mongo indices was deprecated in 2.6 and removed in 2.7[0].

The removed 'dropDups' assertions weren't stricly necessary, since the test is checking that the uniqueness contraint is applied, which it is.

dropDups only comes into play if it's explicitly requested, which we never do.

https://pulp.plan.io/issues/1393

fixes #1393

Actions #6

Updated by semyers over 8 years ago

Some background on all the associated commits:

This was fixed on master in https://github.com/pulp/pulp/pull/2210 (aad4d3a9), but then backported to 2.6-dev in https://github.com/pulp/pulp/pull/2211 (a27aa207), and 2.7-dev in https://github.com/pulp/pulp/pull/2213 (c54ba8f0).

We weren't able to just merge the 2.6-dev changes forward due to a new file appearing in 2.7-dev, hence the two addition PRs for backporting instead of one.

Actions #7

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from MODIFIED to 5
Actions #8

Updated by dkliban@redhat.com almost 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #9

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF