Fix force parameter being always added to URL in execution delete
Co-Authored-By: Dougal Matthews <dougal@redhat.com> Closes-Bug: 1775027 Change-Id: Ia3984a7879ed93292e39b03af65253fb8c4f67e8
This commit is contained in:
parent
b62fe64b2a
commit
146d1c17e2
@ -117,7 +117,8 @@ class ExecutionManager(base.ResourceManager):
|
||||
self._ensure_not_empty(id=id)
|
||||
qparams = {}
|
||||
|
||||
qparams['force'] = bool(force)
|
||||
if force:
|
||||
qparams['force'] = True
|
||||
|
||||
query_string = ("?%s" % urlparse.urlencode(list(qparams.items()))
|
||||
if qparams else "")
|
||||
|
@ -245,7 +245,7 @@ class MistralClientTestBase(base.MistralCLIAuth, base.MistralCLIAltAuth):
|
||||
self.mistral_cli,
|
||||
admin,
|
||||
'execution-delete',
|
||||
params=exec_id
|
||||
params="{} --force".format(exec_id)
|
||||
)
|
||||
|
||||
return ex
|
||||
|
@ -660,7 +660,8 @@ class ExecutionCLITests(base_v2.MistralClientTestBase):
|
||||
self.assertIn(wf_name, [ex['Workflow name'] for ex in execs])
|
||||
self.assertIn(namespace, [ex['Workflow namespace'] for ex in execs])
|
||||
|
||||
self.mistral_admin('execution-delete', params=exec_id)
|
||||
params = "{} --force".format(exec_id)
|
||||
self.mistral_admin('execution-delete', params=params)
|
||||
|
||||
def test_execution_create_delete(self):
|
||||
|
||||
@ -688,7 +689,8 @@ class ExecutionCLITests(base_v2.MistralClientTestBase):
|
||||
self.assertIn(exec_id, [ex['ID'] for ex in execs])
|
||||
self.assertIn(wf_name, [ex['Workflow name'] for ex in execs])
|
||||
|
||||
self.mistral_admin('execution-delete', params=exec_id)
|
||||
params = "{} --force".format(exec_id)
|
||||
self.mistral_admin('execution-delete', params=params)
|
||||
|
||||
def test_execution_create_with_input_and_start_task(self):
|
||||
execution = self.execution_create(
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
mistralclient 3.5.0 introduced a new --force option to delete executions
|
||||
that are still running. However, this had the unintended impact of passing
|
||||
force=false when it wasn't provided. This is incompatible with previous
|
||||
releases of the Mistral API which reject requests as they don't recognise
|
||||
"force".
|
Loading…
Reference in New Issue
Block a user