Project

Profile

Help

Issue #1393

Failing unit tests after fc23 update

Added by semyers almost 5 years ago. Updated over 1 year 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

Associated revisions

Revision aad4d3a9 View on GitHub
Added by semyers almost 5 years ago

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

Revision aad4d3a9 View on GitHub
Added by semyers almost 5 years ago

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

Revision a27aa207 View on GitHub
Added by semyers almost 5 years ago

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

Revision a27aa207 View on GitHub
Added by semyers almost 5 years ago

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

Revision c54ba8f0 View on GitHub
Added by semyers almost 5 years ago

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

Revision c54ba8f0 View on GitHub
Added by semyers almost 5 years ago

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

History

#1 Updated by semyers almost 5 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/

#2 Updated by semyers almost 5 years ago

  • Status changed from NEW to POST

#3 Updated by semyers almost 5 years ago

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

#4 Updated by semyers almost 5 years ago

  • Triaged changed from No to Yes

#5 Updated by mhrivnak almost 5 years ago

  • Platform Release set to 2.8.0

#6 Updated by semyers almost 5 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.

#7 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from MODIFIED to 5

#8 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#9 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF