Repository navigation
OpenConceptLab/ocl_online#470 | Cap concept, mapping and reference lists at LIST_MAX_LIMIT rows per page - #951
Open
snyaggarwal wants to merge 3 commits into
Open
snyaggarwal wants to merge 3 commits into
snyaggarwal wants to merge 3 commits into
Conversation
…sts at LIST_MAX_LIMIT rows per page
snyaggarwal
force-pushed
the
ocl_online#470
branch
from
October 22, 2026 03:09
8885762 to
1042cb6
Compare
snyaggarwal
commented
Oct 22, 2026
snyaggarwal
left a comment
Contributor
Author
There was a problem hiding this comment.
I found two pagination regressions that need changes before this is merged. CI currently reports passing tests and pylint; these cases are not covered by the new tests.
…ermitted Compress lists uncapped
snyaggarwal
commented
Oct 22, 2026
snyaggarwal
left a comment
Contributor
Author
There was a problem hiding this comment.
Rereviewed at 8689051. Both findings from my prior review are addressed: requests without limit retain the configured cap, and permitted compressed search/released-version requests avoid pre-slicing. The new tests cover both paths, and the current Tests and Pylint checks pass. I found no further blocking issue in this revision.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of OpenConceptLab/ocl_online#470. Related: OpenConceptLab/ocl_online#532 — the cap is one fixed setting, with no per-account logic in this repo.
Summary
Concept, mapping and reference lists now serve at most
LIST_MAX_LIMITrows per page (new env setting, default 100), so one page of a heavy list stays a short request. Alimitover the max is capped to it instead of falling back to 25; the paging headers describe the page actually served.What changes
is_page_size_capped— concept and mapping lists (sources, source versions, collections, collection versions, expansions, the global lists, search), version histories, a concept's mappings / children / parents, and references.limitis capped once, inBaseAPIView.initialize, so search (ES) and database lists agree.limit, so withlimit=2000page 2 came back empty. They now use the capped limit, and followingnextreaches every row.includeConcepts/includeMappings/includeReferencescapslimittoo.Compress: trueon a capped list is refused aboveLIST_MAX_LIMITrows (was 1,000);users.list_unpaginatedstays exempt.csv=true;brief=true&checksums=true; FHIR$translate/_count. A missinglimitstill returns 25.Env
LIST_MAX_LIMIT(optional, default 100).Verification
docker exec oclapi2-api-1 python manage.py test core.integration_tests.tests_concepts core.integration_tests.tests_mappings core.integration_tests.tests_collections core.integration_tests.tests_orgs core.common … --keepdb: new tests pass.ConceptPropertyFilterViewTestfails on master as well.docker exec oclapi2-api-1 pylint -j2 core/common …: 10.00/10.Tests, added to existing files: capped pages and following
next(including on a released version), search, global list, version history,limit1–100 unchanged, the checksums exemption,Compress, references, repo detail, an uncapped orgs list, andcap_page_size.Before go-live
Per the ticket: the Mapper's Locales fetch moves off
limit=500first, and integrators get notice (OpenConceptLab/ocl_online#473).🤖 Generated with Claude Code