yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73366
[Bug 1776187] Re: Workflow unregister raises unexpected exception when workflow is not registered
Reviewed: https://review.openstack.org/574229
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=0796adbd87a026f917beee8002b1ca82f48ab3cb
Submitter: Zuul
Branch: master
commit 0796adbd87a026f917beee8002b1ca82f48ab3cb
Author: tstappae <tom.stappaerts@xxxxxxxxx>
Date: Mon Jun 11 13:32:42 2018 +0200
Change catch type for workflow unregister
Since _cls_registry is now a list, removing a non-existing
element throws a ValueError instead of a KeyError.
This did not result in the desired NotRegistered exception.
Change-Id: I2ae7381ce65a0c8fa7deed2c08bfc51e1685f09e
Closes-Bug: 1776187
** Changed in: horizon
Status: In Progress => Fix Released
--
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/1776187
Title:
Workflow unregister raises unexpected exception when workflow is not
registered
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
This is seen as of Change-Id:
I347d113f47587932e4f583d3152e781ad1a4849f on master/Rocky:
When unregistering a workflow there used to be a catched exception
horizon/workflows/base.py:
try:
cls._cls_registry.remove(step_class)
except KeyError:
raise base.NotRegistered('%s is not registered' % cls)
return cls._unregister(step_class)
However since the change _cls_registry changed from a set to a list, making the error a ValueError instead of a KeyError.
class WorkflowMetaclass(type):
def __new__(mcs, name, bases, attrs):
super(WorkflowMetaclass, mcs).__new__(mcs, name, bases, attrs)
attrs["_cls_registry"] = []
return type.__new__(mcs, name, bases, attrs)
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1776187/+subscriptions
References