-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-fetched assets on GHReleases #1750
Comments
@skaldarnar Please try a test with a repo and at least 400 assets in a release and report back. If there really isn't a limit on the number of assets returned, great we can consolidate these calls to a simpler underlying implemenation. If there is a limit, we can still consolidate them, but it will need to be behavior similar to #1679, where we detect if when we're at or above a certain number of assets and switch to from cached to querying a new list. |
@bitwiseman I did a quick test with https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17.0.8.1%2B1 which has 290 assets in the release (+2 auto-generated assets for the source code). When using the Github REST API via gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/adoptium/temurin17-binaries/releases/tags/jdk-17.0.8.1%2B1 > temurin-releases.json
jq '.assets | length' temurin-releases.json I'll try to find repos with more release assets or create some dummy repo myself for futher testing. Interestingly, when fetching the list of release assets via List release assets there's a page limit of 100 according to the documentation 🤔 |
@skaldarnar The page size limit of 100 is standard across the rest API in GitHub. 290 is a reasonable test. If someone exceeds that, we can file a bug to fix it. |
Hi,
I'm a bit confused about the situation on pre-fetched/cached assets on
GHRelease
. I'd like to avoid additional API calls, see also my previous PR #977.Can we make
getAssets()
use the behavior ofassets()
by now, and removeassets()
? Or how do you want to handle this?assets()
lost it's@Preview
/@BetaApi
annotation in 4e7ac70#diff-d6ca05bee054ef7153d926fbe1c6cf67524ecaf7298ada1d9fff838119dceb95L263, maybe by accident. I guess if it would have kept the annotation, it would by now a non-deprecated preview (see #1184).github-api/src/main/java/org/kohsuke/github/GHRelease.java
Lines 282 to 309 in 2062439
The text was updated successfully, but these errors were encountered: