-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
GitHub package marked as “missing” if a necessary tag is not one of the first 100 returned by the API #143
Comments
deathaxe
added a commit
to wbond/package_control
that referenced
this issue
Aug 26, 2022
Clients download first 100 tags to fetch releases. If a repository has many releases with version-prefixes, it is likely for them to be ignored due to this restriction. This commit introduces a generator to fetch all tags until desired amount of releases is found. addresses: wbond/packagecontrol.io#143
deathaxe
added a commit
to wbond/package_control
that referenced
this issue
Aug 26, 2022
Clients download first 100 tags to fetch releases. If a repository has many releases with version-prefixes, it is likely for them to be ignored due to this restriction. This commit introduces a generator to fetch all tags until desired amount of releases is found. addresses: wbond/packagecontrol.io#143
deathaxe
added a commit
to wbond/package_control
that referenced
this issue
Aug 26, 2022
Clients download first 100 tags to fetch releases. If a repository has many releases with version-prefixes, it is likely for them to be ignored due to this restriction. This commit introduces a generator to fetch all tags until desired amount of releases is found. addresses: wbond/packagecontrol.io#143
deathaxe
added a commit
to wbond/package_control
that referenced
this issue
Aug 26, 2022
Clients download first 100 tags to fetch releases. If a repository has many releases with version-prefixes, it is likely for them to be ignored due to this restriction. This commit introduces a generator to fetch all tags until desired amount of releases is found. addresses: wbond/packagecontrol.io#143
deathaxe
added a commit
to wbond/package_control
that referenced
this issue
Aug 26, 2022
addresses: wbond/packagecontrol.io#143 This commit introduces a generator to fetch all tags until desired amount of releases is found. Before this commit clients downloaded first 100 tags to fetch releases. If a repository however contains many releases with version-prefixes, it is likely for some of them to be ignored due to this restriction.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Supersedes #142.
packagecontrol.io/app/lib/package_control/clients/github_client.py
Line 93 in a0a9420
The GitHub client only looks at the first 100 tags. In most cases, this should work fine because the response seems to be sorted in reverse lexicographical order, so the newest tag should usually be the first. However, if a repository uses multiple tag prefixes, such as
v
andst3-
, then it might fail to find the latest tag for one of those prefixes.This happened recently for JS Custom. ST3-compatible tags use the
st3
prefix, but there were more than 100 tags using thev
prefix, so all ST3 tags were pushed to the second page. This caused the package to be marked as missing. (Thom1729/Sublime-JS-Custom#124) I fixed the immediate problem by deleting some older tags. The crawler soon picked it up and JS Custom is back online.Probably, the GitHub client will need to fetch every page of tags in order to avoid this bug completely. The GitHub API call doesn't seem to permit custom sorting or filtering by prefix, and the default sort is technically unspecified. Alternatively, the client could assume that the result is sorted and stop fetching when it finds a tag for each prefix it's looking for.
Related: #41.
The text was updated successfully, but these errors were encountered: