fix: paginate all tags to build olm catalog#221
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OLM catalog template generation script to fetch all bundle tags from the GitHub Packages (GHCR) API instead of being limited to the default first page of results, ensuring the catalog includes more than the latest ~30 images.
Changes:
- Request up to 100 versions per page from the GitHub API (
per_page=100). - Add pagination by following the
Link: ... rel="next"response header and aggregating tags across pages.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "${next_url}" 2>/dev/null \ | ||
| | jq -r '.[].metadata.container.tags[]' 2>/dev/null | ||
| # Follow `Link: <url>; rel="next"` until exhausted; multi-arch+attestation rows overflow page size. | ||
| next_url=$(grep -i '^link:' "${headers_file}" | sed -n 's/.*<\([^>]*\)>; rel="next".*/\1/p' | tr -d '\r') |
Comment on lines
+18
to
+19
| headers_file=$(mktemp) | ||
| next_url="${gh_api_url}" |
|
Docs PR opened: ClickHouse/mintlify-docs-dev#161 Synced upstream Kubernetes Operator docs, adding a monitoring guide, an External Secret section, and the AdditionalPort API reference. |
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.
Why
Currently, the catalog is built on the latest 30 images
What
Use pagination to read all tags