Skip to content
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

Open
Thom1729 opened this issue Jun 30, 2021 · 0 comments

Comments

@Thom1729
Copy link

Supersedes #142.

tags_url = self._make_api_url(user_repo, '/tags?per_page=100')

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 and st3-, 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 the v 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.

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant