APITestCase still needs to be patched utils.patch_middleware_get_user()

Bug #1806053 reported by Akihiro Motoki on 2018-11-30
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Critical
Ivan Kolodyazhny
Ubuntu Cloud Archive
High
Unassigned
Queens
Undecided
Unassigned
Rocky
High
Unassigned
Stein
High
Unassigned
horizon (Ubuntu)
Status tracked in Eoan
Bionic
Undecided
Unassigned
Cosmic
High
Unassigned
Disco
High
Unassigned
Eoan
High
Unassigned
neutron-fwaas-dashboard (Ubuntu)
Status tracked in Eoan
Bionic
Undecided
Unassigned
Cosmic
High
Unassigned
Disco
High
Unassigned
Eoan
High
Unassigned

Bug Description

After merging commit 0d163613265e036818fe567793a4fc88fe140d4a, we see some UT breakage in horizon plugins.

bgpvpn-dashboard https://bugs.launchpad.net/bgpvpn/+bug/1805240
neutron-fwaas-dashboard https://review.openstack.org/621155
neutron-vpnaas-dashboard https://review.openstack.org/621152

Previously APITestCase called patch_middleware_get_user explicitly, but the commit above dropped it. This seems to trigger the above UT failures.

-------------------------------------

SRU Details for Ubuntu
----------------------

[Impact]
See above.

Also, building a horizon dashboard package, such as neutron-fwaas-dashboard, will result in several unit test failures such due to "AttributeError: 'AnonymousUser' object has no attribute 'token'".

[Test Case]
Build the horizon and neutron-fwaas-dashboard packages.

[Regression Potential]
Very minimal as the changes update test code only.

Akihiro Motoki (amotoki) on 2018-11-30
Changed in horizon:
importance: Undecided → Critical
Ivan Kolodyazhny (e0ne) on 2018-11-30
Changed in horizon:
status: New → Confirmed
Ivan Kolodyazhny (e0ne) on 2018-11-30
Changed in horizon:
assignee: nobody → Ivan Kolodyazhny (e0ne)

Fix proposed to branch: master
Review: https://review.openstack.org/621186

Changed in horizon:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/621186
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=de69edd0402146d76c65cec6cc7879c71259fbbf
Submitter: Zuul
Branch: master

commit de69edd0402146d76c65cec6cc7879c71259fbbf
Author: Ivan Kolodyazhny <email address hidden>
Date: Fri Nov 30 17:33:21 2018 +0200

    Add Fix django.contrib.auth.middleware monkey patching for APITestCase

    This patch rollbacks changes in APITestCase introduced in the
    0d163613265e036818fe567793a4fc88fe140d4a commit to unblock Horizon
    plugins gates.

    Change-Id: I6b2be31568e4aa4273990f9cfa76ca139620c84b
    Closes-bug: #1806053
    Closes-bug: #1805240

Changed in horizon:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/625209
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=85fef71c0dfff3b7f816add638ad2d916a2ffe38
Submitter: Zuul
Branch: stable/rocky

commit 85fef71c0dfff3b7f816add638ad2d916a2ffe38
Author: Ivan Kolodyazhny <email address hidden>
Date: Fri Nov 30 17:33:21 2018 +0200

    Add Fix django.contrib.auth.middleware monkey patching for APITestCase

    This patch rollbacks changes in APITestCase introduced in the
    0d163613265e036818fe567793a4fc88fe140d4a commit to unblock Horizon
    plugins gates.

    Change-Id: I6b2be31568e4aa4273990f9cfa76ca139620c84b
    Closes-bug: #1806053
    Closes-bug: #1805240
    (cherry picked from commit de69edd0402146d76c65cec6cc7879c71259fbbf)

tags: added: in-stable-rocky

Reviewed: https://review.openstack.org/629236
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=9ba7a0360756f0c8a0837cc0f9701711bb6e8888
Submitter: Zuul
Branch: stable/queens

commit 9ba7a0360756f0c8a0837cc0f9701711bb6e8888
Author: Ivan Kolodyazhny <email address hidden>
Date: Fri Nov 30 17:33:21 2018 +0200

    Add Fix django.contrib.auth.middleware monkey patching for APITestCase

    This patch rollbacks changes in APITestCase introduced in the
    0d163613265e036818fe567793a4fc88fe140d4a commit to unblock Horizon
    plugins gates.

    Conflicts:
            openstack_dashboard/test/helpers.py

    Note(elod.illes): the above mentioned change in APITestCase was
    backported to queens, so this rollback should be backported, too.

    Change-Id: I6b2be31568e4aa4273990f9cfa76ca139620c84b
    Closes-bug: #1806053
    Closes-bug: #1805240
    (cherry picked from commit de69edd0402146d76c65cec6cc7879c71259fbbf)
    (cherry picked from commit 85fef71c0dfff3b7f816add638ad2d916a2ffe38)

tags: added: in-stable-queens

Reviewed: https://review.openstack.org/633753
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=527553752a2a927ea0f505bd7f977e33fa7b6790
Submitter: Zuul
Branch: stable/rocky

commit 527553752a2a927ea0f505bd7f977e33fa7b6790
Author: Akihiro Motoki <email address hidden>
Date: Tue Jan 29 23:51:37 2019 +0900

    Ensure django.contrib.auth.middleware monkey patching for APIMockTestCase

    This patch is directly proposed to stable/rocky.

    A cherry-pick of I6b2be31568e4aa4273990f9cfa76ca139620c84b
    to stable/rocky is insufficient. The cherry-pick forgot to
    handle APIMockTestCase as the corresponding code is different
    between the master branch and stable/rocky branches and
    as a result APIMockTestCase in stable/rocky branch does not
    monkey-patch django.contrib.auth.middleware.

    Related-Bug: #1806053
    Change-Id: I4993ff5006b6366df64b6d96acddf15be0cc331c

This issue was fixed in the openstack/horizon 15.0.0.0b2 development milestone.

Changed in horizon (Ubuntu Bionic):
status: New → Triaged
Changed in horizon (Ubuntu Cosmic):
status: New → Triaged
Changed in horizon (Ubuntu Disco):
status: New → Fix Released
Changed in horizon (Ubuntu Eoan):
status: New → Fix Released
Changed in horizon (Ubuntu Bionic):
importance: Undecided → High
Changed in horizon (Ubuntu Cosmic):
importance: Undecided → High
Changed in horizon (Ubuntu Disco):
importance: Undecided → High
Changed in horizon (Ubuntu Eoan):
importance: Undecided → High
Corey Bryant (corey.bryant) wrote :

We'll need to cherry pick this for Ubuntu since it's not included in a stable release.

description: updated
Corey Bryant (corey.bryant) wrote :

It appears this is not needed for the Ubuntu Queens package as 0d163613265e036818fe567793a4fc88fe140d4a had not yet landed as of 13.0.1.

Changed in horizon (Ubuntu Bionic):
importance: High → Undecided
status: Triaged → Invalid
Changed in neutron-fwaas-dashboard (Ubuntu Cosmic):
importance: Undecided → High
status: New → Triaged

This issue was fixed in the openstack/horizon 13.0.2 release.

Changed in neutron-fwaas-dashboard (Ubuntu Bionic):
status: New → Invalid
Changed in neutron-fwaas-dashboard (Ubuntu Disco):
importance: Undecided → High
status: New → Triaged
Changed in neutron-fwaas-dashboard (Ubuntu Eoan):
importance: Undecided → High
status: New → Triaged
Corey Bryant (corey.bryant) wrote :

Fixed versions of neutron-fwaas-dashboard have been uploaded to eoan as well as disco/cosmic unapproved queues [1] where they are awaiting SRU team review.

[1]
https://launchpad.net/ubuntu/disco/+queue?queue_state=1&queue_text=neutron-fwaas-dashboard
https://launchpad.net/ubuntu/cosmic/+queue?queue_state=1&queue_text=neutron-fwaas-dashboard

Corey Bryant (corey.bryant) wrote :

Also a fixed version of horizon has been uploaded to the cosmic unapproved queue [1] where it is awaiting SRU team review.

[1]
https://launchpad.net/ubuntu/cosmic/+queue?queue_state=1&queue_text=horizon

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron-fwaas-dashboard - 2.0.1-0ubuntu2

---------------
neutron-fwaas-dashboard (2.0.1-0ubuntu2) eoan; urgency=medium

  * d/control: Add Breaks/Replaces to python3-neutron-fwaas-dashboard to
    ensure python-neutron-fwaas-dashboard is removed on upgrade (LP: #1828293).
  * d/control: (Build-)Depends on latest python3-django-horizon and
    openstack-dashboard to ensure unit tests are successful (LP: #1806053).

 -- Corey Bryant <email address hidden> Thu, 09 May 2019 22:05:46 -0400

Changed in neutron-fwaas-dashboard (Ubuntu Eoan):
status: Triaged → Fix Released

This issue was fixed in the openstack/horizon 14.0.3 release.

Hello Akihiro, or anyone else affected,

Accepted horizon into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/horizon/3:14.0.2-0ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. 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-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in horizon (Ubuntu Cosmic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Akihiro Motoki (amotoki) wrote :

I filed this bug to the upstream horizon, so I am not the right person to validate Ubuntu package status.

Corey Bryant (corey.bryant) wrote :

Hello Akihiro, or anyone else affected,

Accepted horizon into rocky-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:rocky-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-rocky-needed to verification-rocky-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-rocky-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-rocky-needed
Łukasz Zemczak (sil2100) wrote :

Hello Akihiro, or anyone else affected,

Accepted neutron-fwaas-dashboard into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/neutron-fwaas-dashboard/2.0.1-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. 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-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in neutron-fwaas-dashboard (Ubuntu Disco):
status: Triaged → Fix Committed
tags: added: verification-needed-disco
Corey Bryant (corey.bryant) wrote :

Hello Akihiro, or anyone else affected,

Accepted neutron-fwaas-dashboard into stein-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:stein-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-stein-needed to verification-stein-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-stein-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-stein-needed
Brian Murray (brian-murray) wrote :

Hello Akihiro, or anyone else affected,

Accepted neutron-fwaas-dashboard into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/neutron-fwaas-dashboard/1.5.0-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. 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-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in neutron-fwaas-dashboard (Ubuntu Cosmic):
status: Triaged → Fix Committed
Corey Bryant (corey.bryant) wrote :

Hello Akihiro, or anyone else affected,

Accepted neutron-fwaas-dashboard into rocky-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:rocky-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-rocky-needed to verification-rocky-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-rocky-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!

Corey Bryant (corey.bryant) wrote :

Package built successfully in disco-proposed, cosmic-proposed, stein-proposed, and rocky-proposed. Tagging as verified.

tags: added: verification-done-disco verification-stein-done
removed: verification-needed-disco verification-stein-needed
tags: added: verification-done verification-done-cosmic verification-rocky-done
removed: verification-needed verification-needed-cosmic verification-rocky-needed

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. 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.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:14.0.2-0ubuntu4

---------------
horizon (3:14.0.2-0ubuntu4) cosmic; urgency=medium

  * d/p/*-monkey-patching-for-APITestCase.patch: Cherry-picked from
    upstream stable/rocky branch to fix unit tests for plugin dashboards
    (LP: #1806053).

horizon (3:14.0.2-0ubuntu3) cosmic; urgency=medium

  * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
    When creating a server using an image boot source to new volume,
    horizon specified device_name 'vda'. If for instance we use an image
    with disk_bus type scsi, horizon will name the device_name as 'vda'
    when it should be 'sda'. As per BDMv2 documentation, it's best to not
    specify device_name. (LP: #1822129)

 -- Corey Bryant <email address hidden> Thu, 09 May 2019 14:49:48 -0400

Changed in horizon (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for horizon 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.

Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:14.0.2-0ubuntu4~cloud0
---------------

 horizon (3:14.0.2-0ubuntu4~cloud0) bionic-rocky; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 horizon (3:14.0.2-0ubuntu4) cosmic; urgency=medium
 .
   * d/p/*-monkey-patching-for-APITestCase.patch: Cherry-picked from
     upstream stable/rocky branch to fix unit tests for plugin dashboards
     (LP: #1806053).
 .
 horizon (3:14.0.2-0ubuntu3) cosmic; urgency=medium
 .
   * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
     When creating a server using an image boot source to new volume,
     horizon specified device_name 'vda'. If for instance we use an image
     with disk_bus type scsi, horizon will name the device_name as 'vda'
     when it should be 'sda'. As per BDMv2 documentation, it's best to not
     specify device_name. (LP: #1822129)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron-fwaas-dashboard - 2.0.1-0ubuntu1.1

---------------
neutron-fwaas-dashboard (2.0.1-0ubuntu1.1) disco; urgency=medium

  * d/gbp.conf: Create stable/stein branch.
  * d/control: Add Breaks/Replaces to python3-neutron-fwaas-dashboard to
    ensure python-neutron-fwaas-dashboard is removed on upgrade (LP: #1828293).
  * d/control: (Build-)Depends on latest python3-django-horizon and
    openstack-dashboard to ensure unit tests are successful (LP: #1806053).

 -- Corey Bryant <email address hidden> Tue, 07 May 2019 14:15:42 -0400

Changed in neutron-fwaas-dashboard (Ubuntu Disco):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron-fwaas-dashboard - 1.5.0-0ubuntu3.1

---------------
neutron-fwaas-dashboard (1.5.0-0ubuntu3.1) cosmic; urgency=medium

  * d/gbp.conf: Create stable/rocky branch.
  * d/control: Add Breaks/Replaces to python3-neutron-fwaas-dashboard to
    ensure python-neutron-fwaas-dashboard is removed on upgrade (LP: #1828293).
  * d/control: (Build-)Depends on latest python3-django-horizon and
    openstack-dashboard to ensure unit tests are successful (LP: #1806053).

 -- Corey Bryant <email address hidden> Wed, 31 Oct 2018 14:10:53 -0400

Changed in neutron-fwaas-dashboard (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for neutron-fwaas-dashboard 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.

Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package neutron-fwaas-dashboard - 2.0.1-0ubuntu1.1~cloud0
---------------

 neutron-fwaas-dashboard (2.0.1-0ubuntu1.1~cloud0) bionic-stein; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron-fwaas-dashboard (2.0.1-0ubuntu1.1) disco; urgency=medium
 .
   * d/gbp.conf: Create stable/stein branch.
   * d/control: Add Breaks/Replaces to python3-neutron-fwaas-dashboard to
     ensure python-neutron-fwaas-dashboard is removed on upgrade (LP: #1828293).
   * d/control: (Build-)Depends on latest python3-django-horizon and
     openstack-dashboard to ensure unit tests are successful (LP: #1806053).

Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for neutron-fwaas-dashboard 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.

Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package neutron-fwaas-dashboard - 1.5.0-0ubuntu3.1~cloud0
---------------

 neutron-fwaas-dashboard (1.5.0-0ubuntu3.1~cloud0) bionic-rocky; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron-fwaas-dashboard (1.5.0-0ubuntu3.1) cosmic; urgency=medium
 .
   * d/gbp.conf: Create stable/rocky branch.
   * d/control: Add Breaks/Replaces to python3-neutron-fwaas-dashboard to
     ensure python-neutron-fwaas-dashboard is removed on upgrade (LP: #1828293).
   * d/control: (Build-)Depends on latest python3-django-horizon and
     openstack-dashboard to ensure unit tests are successful (LP: #1806053).

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

Duplicates of this bug

Other bug subscribers