value of next in the response when query filters are used should not contain JSON formatting

Bug #1793344 reported by Mohammad S Khan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Hardik Jasani

Bug Description

when using query parameters with limit in most apis, the value of next contains JSON formatting. It should be reusable as is.

e.g. /v2/executions/522733a9-0b07-4f44-ac52-b2fb7d113240/tasks?sort_dirs=asc,asc&sort_keys=created_at,id&limit=2

the next value returned is
8989/v2/tasks?workflow_execution_id={'eq': u'522733a9-0b07-4f44-ac52-b2fb7d113240'}&sort_dirs=asc,asc&sort_keys=created_at,id&limit=2&marker=16c81b61-7a78-48dc-85b2-4c90fe6f8e07

another case where 'in' is used with limit

8989/v2/tasks?state=in:ERROR,SUCCESS&limit=3

next response is
8989/v2/tasks?state={'in': [u'ERROR', u'SUCCESS']}&sort_dirs=asc,asc&sort_keys=created_at,id&limit=3&marker=16c81b61-7a78-48dc-85b2-4c90fe6f8e07

Changed in mistral:
milestone: none → stein-1
assignee: nobody → Hardik Jasani (hjasani)
Changed in mistral:
importance: Undecided → High
Dougal Matthews (d0ugal)
Changed in mistral:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/608677

Changed in mistral:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to mistral-tempest-plugin (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/608686

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/608677
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=08ba20c8d217713a140b90240176bc7959125b62
Submitter: Zuul
Branch: master

commit 08ba20c8d217713a140b90240176bc7959125b62
Author: hardikj <email address hidden>
Date: Mon Oct 8 19:07:26 2018 +0530

    Fix next link in get resource list rest API

    Fix the issue where `next` link in the response of the REST API, when
    used with pagination, gets corrupted and makes it unusable. After this
    fix, next link should be readily usable.

    Change-Id: Idf45a59e0b07d8306cc82391679fe30a9cd2f0c1
    Closes-Bug: #1793344

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/610926

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/rocky)

Reviewed: https://review.openstack.org/610926
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=dfb1f064ad35cea13716c59d6d59b41cd1a3fd8d
Submitter: Zuul
Branch: stable/rocky

commit dfb1f064ad35cea13716c59d6d59b41cd1a3fd8d
Author: hardikj <email address hidden>
Date: Mon Oct 8 19:07:26 2018 +0530

    Fix next link in get resource list rest API

    Fix the issue where `next` link in the response of the REST API, when
    used with pagination, gets corrupted and makes it unusable. After this
    fix, next link should be readily usable.

    Change-Id: Idf45a59e0b07d8306cc82391679fe30a9cd2f0c1
    Closes-Bug: #1793344
    (cherry picked from commit 08ba20c8d217713a140b90240176bc7959125b62)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 7.0.4

This issue was fixed in the openstack/mistral 7.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 8.0.0.0b1

This issue was fixed in the openstack/mistral 8.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.