-
-
Notifications
You must be signed in to change notification settings - Fork 927
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
Compact indexer versions API is not organizing gems added after a certain point. #3904
Comments
Hello @LukeIGS! This is expected. The static file is at rubygems.org renegerated each month using https://github.com/rubygems/rubygems.org/blob/fcf030c9932df4fb6b0c5f99e878ef2790ca4fd9/config/deploy/versions-list-update-monthly.yaml.erb job. Currently I have no idea how to merge those two lists for geminabox proxy functionality. |
Alright, if this is intentional than i can probably work around it when merging the file. Just wanted to make sure this wasn't a bug or something as the spec for how this works is pretty hard to track down. Would be nice if the rubygems.org documentation section included mention of the compact index api implementations or something i guess? |
Yeah, I haven't had time to work on it, but from what I've gathered it should be good enough to just prepend our versions to the list, smack the updated date on it and strip out any gems that share a name with a local one. The brief simply states that it must be organized somehow. Rubygems.org does alphabetical followed by date added for any runtime updates between updates so we can just blindly take that. Our final order could be locals followed by remotes sans duplicated names |
The order really doesn't matter, so long as (the majority of the time) it is append-only. We do the monthly update of the "base" file only to keep file size minimal. |
Even if it is, it should probably be referenced somewhere in the rubygems.org documentation (https://guides.rubygems.org/rubygems-org-api/ might be a good spot) instead of having to go to a random git repo to find it, also the way that rubygems.org implemented it could be different than the gem. I know i'm not the only person looking for this.
That's good to know, and makes the job much easier for finalizing the versions list merge in geminabox. |
https://guides.rubygems.org/rubygems-org-api/ is good place, but it is not clear which endpoints are mandatory for gem/bundle commands (for gemserver functionality) and which are just RubyGems.org public API around additional functionality. It is on my list to document minimal gemserver API. There is some documentation effort already started by @segiddins at #3896. |
@LukeIGS can we close this issue? |
The versions api seems to be designed to group gems by their name, then versions, however at some point it seems to have stopped adding new versions of a given gem to the version list for that gem and recalculating the hash at the end of the line.
Steps to Reproduce
Expected Behavior
Gems that exist further up in the file should have their versions appended to the list for that gem, and remain in alphabetical order.
Current Behavior
Duplicated entries exist in the versions file listing one version of the gem each.
Environment
Browser and its version: Vivaldi 6.1.3035.111 (Stable channel) (64-bit)
Additional Context
This is a problem for gem proxy servers like geminabox that need to query the version list from rubygems.org and merge it, but may have other implications as well that I'm unaware of with regards to bundler.
The text was updated successfully, but these errors were encountered: