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

Return downloads for the top 5 most downloaded versions #9696

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshka
Copy link

@joshka joshka commented Oct 19, 2024

This changes the downloads endpoint to return the five most downloaded
versions of a crate, instead of the five most recent versions. This
should make the endpoint more useful for users who are interested in
seeing the most popular versions of a crate.

In particular it helps with the case where a crate has many pre-release
versions, which are not as interesting to users as the stable versions.

Fixes: #4336


I'm not certain this is the right approach and will discuss more in the discussion thread. Putting this here as something which maybe can be tested against live data to understand the perf issues. I'm not sure how to do that.

This changes the downloads endpoint to return the five most downloaded
versions of a crate, instead of the five most recent versions. This
should make the endpoint more useful for users who are interested in
seeing the most popular versions of a crate.

In particular it helps with the case where a crate has many pre-release
versions, which are not as interesting to users as the stable versions.
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.72%. Comparing base (227da83) to head (d43887b).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9696   +/-   ##
=======================================
  Coverage   88.71%   88.72%           
=======================================
  Files         287      287           
  Lines       29336    29345    +9     
=======================================
+ Hits        26026    26036   +10     
+ Misses       3310     3309    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Turbo87
Copy link
Member

Turbo87 commented Oct 19, 2024

thanks, but this is a breaking change to our API, which makes this hard to merge as-is

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-backend ⚙️ labels Oct 19, 2024
@joshka
Copy link
Author

joshka commented Oct 19, 2024

thanks, but this is a breaking change to our API, which makes this hard to merge as-is

This is more for the discussion / idea than for actually merging as-is at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants