yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72653
[Bug 1303091] Re: workflow contributes() should not return None
This is a long-standing bug but it is just a possible improvement. It
seems we do not need this. Let's mark this as Won't Fix.
** Changed in: horizon
Milestone: next => None
** Changed in: horizon
Status: Confirmed => Won't Fix
--
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/1303091
Title:
workflow contributes() should not return None
Status in OpenStack Dashboard (Horizon):
Won't Fix
Bug description:
Several number of workflow classes use the following manner:
def contribute(self, data, context):
context = super(AddIPSecPolicyStep, self).contribute(data, context)
context.update({'lifetime': {'units': data['lifetime_units'],
'value': data['lifetime_value']}})
context.pop('lifetime_units')
context.pop('lifetime_value')
if data:
return context
A return value of contribute() is passed to contributes() of subsequent steps,
so context should be returned from contributes.
Otherwise it leads to resetting self.context in workflow class.
https://github.com/openstack/horizon/blob/master/horizon/workflows/base.py#L656
Fortunately, we have the wrong style in a workflow with a single step.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1303091/+subscriptions
References