Use workflow id in Mistral REST API

Registered by Lingxian Kong

currently, we identify a workflow by its name, of cource, the workflow name is unique within a tenant. However, when we use 'public' workflows or we want to get benifits from workflow sharing feature[1], we may see more than one workflows with the same name (you can see a related bug here[2]). Even worse, users will never see other 'same-name' workflows when performing 'mistral workflow-get <name>' command, since it always returns the first one.

Look at almost all other projects, they always use UUID as globally unique resource identifier, especially in the REST API, the resource name is a string that can be duplicated throughout the whole system, and may be changed frequently as the time goes by.

So, I propose we use id as the workflow identifier in the REST API. What's more, we can consider using id for other resources after that.

[1]: https://blueprints.launchpad.net/mistral/+spec/mistral-resource-sharing
[2]: https://bugs.launchpad.net/python-mistralclient/+bug/1518276

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
Lingxian Kong
Direction:
Approved
Assignee:
Lingxian Kong
Definition:
Approved
Series goal:
Proposed for mitaka
Implementation:
Implemented
Milestone target:
milestone icon 2.0.0
Started by
Lingxian Kong
Completed by
Renat Akhmerov

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/use-workflow-id-in-rest-api,n,z

Addressed by: https://review.openstack.org/255649
    Support UUID when getting a workflow definition

Addressed by: https://review.openstack.org/256951
    Support UUID when updating a workflow definition

Addressed by: https://review.openstack.org/256956
    Support UUID when deleting a workflow definition

Addressed by: https://review.openstack.org/255645
    Support workflow UUID in REST API

Addressed by: https://review.openstack.org/256959
    Workflow name can not be in the format of UUID

Addressed by: https://review.openstack.org/261943
    Support workflow UUID when creating cron trigger

Addressed by: https://review.openstack.org/275129
    Support workflow id in execution operations

Addressed by: https://review.openstack.org/275428
    Add workflow id column to executions_v2 table

Addressed by: https://review.openstack.org/276026
    Fix occasional test failure by assertListEqual

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.