•  
      request #6400 REST route /tracker_reports/:id/artifacts has problems with pagination
    Infos
    #6400
    Laurent Delaigue (ldelaigue)
    2014-03-07 18:48
    2014-03-06 10:59
    6474
    Details
    REST route /tracker_reports/:id/artifacts has problems with pagination
    OPTIONS /tracker_reports/:id/artifacts does not return pagination info in the HTTP headers.
    => This prevents correct preparation of paginated calls

    GET /tracker_reports/:id/artifacts?offset=10&limit=10 returns wrong pagination info: HTTP header X-PAGINATION-OFFSET is always 0, it should be if called with the given query string.
    => This forces clients to not take this offset header into account, which is dangerous.

    I haven't checked if the same occurs for other paginated routes, I think it'd be interesting to check such other routes though.
    API
    6.10
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    Empty
    Attachments
    Empty
    References
    Referencing request #6400

    Artifact Tracker v5

    rel #6234 6.12

    Git commit

    tuleap/tuleap/dev

    Merge commit 'refs/changes/46/2046/1' of ssh://gerrit.tuleap.net:29418/tuleap into tuleap-stable-master 55fe87fe32
    Fix request request #6400 - REST route /tracker_reports/:id/artifacts has problems with pagination 76f42e42c2

    tuleap/tuleap/stable

    Merge commit 'refs/changes/46/2046/1' of ssh://gerrit.tuleap.net:29418/tuleap into tuleap-stable-master 55fe87fe32
    Fix request request #6400 - REST route /tracker_reports/:id/artifacts has problems with pagination 76f42e42c2
    Fix request request #6400 - REST route /tracker_reports/:id/artifacts has problems with pagination f4af4f64c3

    tuleap/u/hkelf/tuleap/stable

    Merge commit 'refs/changes/46/2046/1' of ssh://gerrit.tuleap.net:29418/tuleap into tuleap-stable-master 55fe87fe32
    Fix request request #6400 - REST route /tracker_reports/:id/artifacts has problems with pagination 76f42e42c2

    tuleap/u/vaceletm/tuleap/dev

    Merge commit 'refs/changes/46/2046/1' of ssh://gerrit.tuleap.net:29418/tuleap into tuleap-stable-master 55fe87fe32
    Fix request request #6400 - REST route /tracker_reports/:id/artifacts has problems with pagination 76f42e42c2
    Fix request request #6400 - REST route /tracker_reports/:id/artifacts has problems with pagination f4af4f64c3
    Referenced by request #6400

    Follow-ups

    User avatar
    Merged in 6.11.99.2

    • Status changed from Under review to Closed
    • Reported in version set to 6.10
    User avatar
    I cannot introduce SIZE in OPTIONS without perf penalty.

    I fixed the headers on GET in gerrit #2046

    • Status changed from Verified to Under review
    • Assigned to changed from None to Manuel Vacelet (vaceletm)
    User avatar
    Sorry, I should have been more accurate.
    I expected the X-PAGINATION-SIZE in the header, to know how many elements there are without calling GET.
    Now if it's not possible, for example for performance reasons, I'd understand and be able to live without.
    User avatar
    For the first one, I do have the headers on tuleap.net:
    
    curl -v -XOPTIONS https://tuleap.net/api/v1/tracker_reports/242/artifacts
    
    < HTTP/1.1 200 OK
    < Date: Thu, 06 Mar 2014 17:30:23 GMT
    < Server: Apache/2.2.3 (CentOS)
    < X-Powered-By: Luracast Restler v3.0.0rc4
    < Vary: Accept,User-Agent
    < Allow: OPTIONS, GET
    < Access-Control-Allow-Methods: OPTIONS, GET
    < X-PAGINATION-LIMIT: 10
    < X-PAGINATION-OFFSET: 0
    < X-PAGINATION-LIMIT-MAX: 50
    < Cache-Control: no-cache, must-revalidate
    < Expires: 0
    < Content-Language: en
    < Content-Length: 0
    < Content-Type: application/json; charset=utf-8

    For the second one I confirm the bug (the other routes are not impacted).

     

     


    • Status changed from New to Verified