[Victoria] Backported test requires newer ddt than included in test-requirements.txt

Bug #1948934 reported by Chris MacNaughton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Medium
Unassigned
Ubuntu Cloud Archive
New
Undecided
Unassigned
Victoria
Fix Released
Undecided
Unassigned

Bug Description

test-requirements.txt requires ddt>=1.2.1 ; however, 17.2.0 includes a test backport (cinder/tests/unit/volume/flows/test_create_volume_flow.py) that uses a module name that doesn't exist in DDT until 1.4.0 (https://github.com/datadriventests/ddt/commit/6bf51b5d7887049eda580932643a5408ca0f5e3f)

Running the unit tests results in the following traceback:

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: cinder.tests.unit.volume.flows.test_create_volume_flow
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/build/cinder-17.2.0/cinder/tests/unit/volume/flows/test_create_volume_flow.py", line 1258, in <module>
    @ddt.ddt(testNameFormat=ddt.TestNameFormat.INDEX_ONLY)
AttributeError: module 'ddt' has no attribute 'TestNameFormat'

no longer affects: cinder (Ubuntu)
description: updated
Changed in cinder:
importance: Undecided → Medium
tags: added: ddt unittest
Changed in cinder:
milestone: none → 17.2.1
summary: - Backported test requires newer ddt than included in test-
+ [Victoria] Backported test requires newer ddt than included in test-
requirements.txt
Eric Harney (eharney)
tags: added: tests
removed: ddt unittest
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/cinder/+/815673

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/815673
Committed: https://opendev.org/openstack/cinder/commit/bda74498d67a2d9d978eb1f522841387bec6310d
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit bda74498d67a2d9d978eb1f522841387bec6310d
Author: Eric Harney <email address hidden>
Date: Wed Oct 27 10:15:17 2021 -0400

    Tests: Fix compatibility with ddt 1.2.x

    stable/victoria lists that ddt 1.2.1 is supported,
    but this decoration does not work with that version
    of ddt.

    Remove the TestNameFormat parameter for these tests.

    (stable-branch only fix)
    Closes-Bug: #1948934
    Change-Id: Ic91a978303f11617bf29c88bf82235998947552a

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote : Please test proposed package

Hello Chris, or anyone else affected,

Accepted cinder into victoria-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:victoria-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-victoria-needed to verification-victoria-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-victoria-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-victoria-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Verification is successful as unit tests now run successfully

tags: added: verification-victoria-done
removed: verification-victoria-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for cinder has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package cinder - 2:17.2.0-0ubuntu1~cloud0
---------------

 cinder (2:17.2.0-0ubuntu1~cloud0) focal-victoria; urgency=medium
 .
   * New stable point release for OpenStack Victoria (LP: #1948913).
   * d/p/fix-unit-test-import.patch: Fix unit tests (LP: #1948934).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 17.3.0

This issue was fixed in the openstack/cinder 17.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.