Project

Profile

Help

Issue #3565

closed

As a user, pagination is consistent across the API

Added by kersom over 6 years ago. Updated over 5 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 35
Quarter:

Description

I modified the PAGE_SIZE to 2, instead of 100 as default. And I followed the steps described in the Pulp-file until the sync step.

Then I query the following endpoint and get the following result.

[root@localhost ~]# http GET http://localhost:8000/api/v3/content/file/
HTTP/1.1 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Date: Thu, 12 Apr 2018 18:01:36 GMT
Server: WSGIServer/0.2 CPython/3.6.5
Vary: Accept

{
    "next": null,
    "previous": null,
    "results": [
        {
            "_href": "http://localhost:8000/api/v3/content/file/62b65401-bf7c-485c-8c0b-6f03e6189a47/",
            "artifact": "http://localhost:8000/api/v3/artifacts/9b05f196-a8c1-4837-a45f-d76a60325fc0/",
            "relative_path": "test2.iso",
            "type": "file"
        },
        {
            "_href": "http://localhost:8000/api/v3/content/file/79d30322-80da-4e98-828f-02e325834a63/",
            "artifact": "http://localhost:8000/api/v3/artifacts/dbaec119-2cea-4c96-9c43-4c8fdf903bc0/",
            "relative_path": "2.iso",
            "type": "file"
        },
        {
            "_href": "http://localhost:8000/api/v3/content/file/82f2901e-7935-4b52-97be-6a41e3ffe318/",
            "artifact": "http://localhost:8000/api/v3/artifacts/91a5218c-9da2-4547-82ef-54bdf6988f8e/",
            "relative_path": "test3.iso",
            "type": "file"
        },
        {
            "_href": "http://localhost:8000/api/v3/content/file/8517dcba-ef7d-46ce-87e2-a979c8dd4e87/",
            "artifact": "http://localhost:8000/api/v3/artifacts/84e406e6-fbb9-41d8-a546-a2fed8fffa21/",
            "relative_path": "test.iso",
            "type": "file"
        },
        {
            "_href": "http://localhost:8000/api/v3/content/file/9f4a3332-5380-48d3-bebe-ec1be6d8db40/",
            "artifact": "http://localhost:8000/api/v3/artifacts/9e742e99-b395-4925-ac26-38c6407dfca9/",
            "relative_path": "3.iso",
            "type": "file"
        },
        {
            "_href": "http://localhost:8000/api/v3/content/file/faa60ba4-a90f-4755-ae58-a40c3b4e8cab/",
            "artifact": "http://localhost:8000/api/v3/artifacts/a8400d60-f882-4d95-9403-297fc422eca1/",
            "relative_path": "1.iso",
            "type": "file"
        }
    ]
}

Since the value of page_siize was set to 2, I was expecting the pagination to be triggered. The url used to sync has 3 files.

I was able to test the pagination in urls related to pulpcore.

Actions #1

Updated by kersom over 6 years ago

  • Status changed from NEW to CLOSED - WORKSFORME
Actions #2

Updated by kersom over 6 years ago

I re-installed pulpcore, and pulp-file from source and pagination worked as expected. A lot of code was merged today, mainly related to filters, not sure, if there is any changing affecting pagination merged today. But I will keep testing.

Actions #3

Updated by amacdona@redhat.com over 6 years ago

  • Subject changed from Pagination not working to As a user, pagination is consistent across the API
  • Status changed from CLOSED - WORKSFORME to NEW
  • Sprint set to Sprint 35
Actions #4

Updated by amacdona@redhat.com over 6 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

I was able to set pagination to 1, and I tested with /content/file/ and /distributions/, both paginated correctly.

Note:
Django webserver is smart and usually restarts when the code is changed, but in my experience it sometimes doesn't notice. If you experience this problem, I suggest manually restarting the webserver.

If it is still a problem, please reopen.

Actions #5

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #6

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)

Also available in: Atom PDF