Mistral should returns 404 in the case of an absent execution's tasks request

Bug #1998210 reported by Vasudeo Nimbekar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Undecided
Vasudeo Nimbekar

Bug Description

Mistral GET execution's tasks API returns 200 response status code and empty tasks response for absent execution id.

To reproduce:

- Execute GET request for v2/executions/{execution-id}/tasks API by passing absent execution-id.

Ex:
request:
GET http://mistral-host/v2/executions/00000000-0000-0000-0000-000000000000/tasks

response:
status code - 200
response data - {"tasks": []}

expected response:
status code - 404
response data -
{
    "faultcode": "Client",
    "faultstring": "WorkflowExecution not found [id=00000000-0000-0000-0000-000000000000]",
    "debuginfo": null
}

summary: - Mistral returns 200 OK in the case of an absent execution's tasks
+ Mistral should returns 404 in the case of an absent execution's tasks
request
Changed in mistral:
status: New → In Progress
Changed in mistral:
assignee: nobody → Vasudeo Nimbekar (devnimbekar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.opendev.org/c/openstack/mistral/+/865985
Committed: https://opendev.org/openstack/mistral/commit/87c08ff42172c9fe7735777c98d07ec32c4cd179
Submitter: "Zuul (22348)"
Branch: master

commit 87c08ff42172c9fe7735777c98d07ec32c4cd179
Author: Vasudeo Nimbekar <email address hidden>
Date: Tue Nov 29 18:16:56 2022 +0530

    Update get execution's tasks functionality

    After this patch, it will validate execution-id exists in the DB while fetching tasks for the execution-id So, GET /v2/executions/execution_id/tasks API will return 404 for absent execution id.

    Closes-Bug: #1998210
    Change-Id: I6ac05f4b87c470a68cd67f19d1bd95a4d6cebe59

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 16.0.0.0b1

This issue was fixed in the openstack/mistral 16.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.