Skip to content

Implement pagination for receiving MCR catalog items - #1870

Merged
alerickson merged 3 commits into
masterfrom
MCRPagination
Sep 13, 2025
Merged

alerickson merged 3 commits into
masterfrom
MCRPagination

Conversation

@adityapatwardhan

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) commented Sep 8, 2025 •

Copy link
Copy Markdown
Member

PR Summary

This pull request enhances the Azure Container Registry repository listing functionality by adding support for paginated API responses. The main improvement ensures that all repositories are retrieved, even when the server returns results across multiple pages. The most important changes are:

Pagination Support for Repository Listing:

  • Modified FindAllRepositories to call GetHttpResponseJObjectUsingDefaultHeaders with a new usePagination parameter set to true, enabling paginated retrieval of repositories.
  • Updated GetHttpResponseJObjectUsingDefaultHeaders to accept a usePagination flag and, when enabled, route requests through a new pagination-aware method. [1] [2]
  • Introduced SendRequestAsyncWithPagination, which iteratively follows pagination links in the HTTP response headers (Link: ... rel="next") to aggregate all repository results into a single JObject.

Code Cleanup and Refactoring:

  • Reorganized and deduplicated using directives at the top of ContainerRegistryServerAPICalls.cs for improved readability and maintainability.

PR Context

PR Checklist

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alerickson alerickson added this to the 1.2.0-preview.3 milestone Sep 9, 2025
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) changed the title WIP: Implement pagination for receving MCR catalog items Implement pagination for receiving MCR catalog items Sep 11, 2025
@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alerickson
alerickson enabled auto-merge (squash) September 13, 2025 00:36
@alerickson
alerickson disabled auto-merge September 13, 2025 00:36
@alerickson
alerickson self-requested a review September 13, 2025 00:37
@alerickson
alerickson merged commit b1ec1ea into master Sep 13, 2025
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants