← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1301374] [NEW] Failure in workflows cause the message to be displayed twice

 

Public bug reported:

The handle() method for worflows expects a boolean to be returned to
indicate if the workflow completed successfully, however returning False
results in two error messages being displayed.

https://github.com/openstack/horizon/blob/f4282f73ec/horizon/workflows/base.py#L808

You can reproduce by causing an error somewhere where we use the
handle() method and return False. For example:

1. Go to the Access & Security page
2. Click on Allocate IP
3. Turn off the Neutron service (or nova-network if using it for networking)
4. Click on "Allocate IP" in the modal: 2 error messages are displayed ("Error: Connection to neutron failed: Maximum attempts reached" and "Error: Connection to neutron failed: Maximum attempts reached")

https://github.com/openstack/horizon/blob/f4282f73ec/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py#L143


I suspect it's because both exceptions.handle() and the workflows call on messages.error():

https://github.com/openstack/horizon/blob/f4282f73ec/horizon/workflows/views.py#L200
https://github.com/openstack/horizon/blob/f4282f73ec/horizon/exceptions.py#L215

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1301374

Title:
  Failure in workflows cause the message to be displayed twice

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  The handle() method for worflows expects a boolean to be returned to
  indicate if the workflow completed successfully, however returning
  False results in two error messages being displayed.

  https://github.com/openstack/horizon/blob/f4282f73ec/horizon/workflows/base.py#L808

  You can reproduce by causing an error somewhere where we use the
  handle() method and return False. For example:

  1. Go to the Access & Security page
  2. Click on Allocate IP
  3. Turn off the Neutron service (or nova-network if using it for networking)
  4. Click on "Allocate IP" in the modal: 2 error messages are displayed ("Error: Connection to neutron failed: Maximum attempts reached" and "Error: Connection to neutron failed: Maximum attempts reached")

  https://github.com/openstack/horizon/blob/f4282f73ec/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py#L143

  
  I suspect it's because both exceptions.handle() and the workflows call on messages.error():

  https://github.com/openstack/horizon/blob/f4282f73ec/horizon/workflows/views.py#L200
  https://github.com/openstack/horizon/blob/f4282f73ec/horizon/exceptions.py#L215

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1301374/+subscriptions


Follow ups

References