Skip to content

Downloads statistics seem broken #1704

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

Closed
ghost opened this issue Apr 3, 2019 · 6 comments · Fixed by #1728
Closed

Downloads statistics seem broken #1704

ghost opened this issue Apr 3, 2019 · 6 comments · Fixed by #1728

Comments

@ghost
Copy link

ghost commented Apr 3, 2019

The downloads graph at https://crates.io/crates/crossbeam-channel displays zero 7-day avg downloads for the latest version (0.3.8). This must be wrong since the latest version is widely used and definitely has been downloaded at least once.

I suspect something is wrong due to yanking. Version 0.3.5 was yanked and all versions newer than 0.3.5 appear to be downloaded zero times, which can't be true. Looks like a bug.

@sgrif
Copy link
Contributor

sgrif commented Apr 3, 2019

I can confirm that the download counts are present in the database and are being correctly served by the API, so the bug appears to be in the UI

@atouchet
Copy link
Contributor

atouchet commented Apr 3, 2019

This is affecting other crates as well. It's not just crossbeam-channel that is showing incorrect values.

@kzys
Copy link
Contributor

kzys commented Apr 10, 2019

Yes. The API looks fine. Let me take a look.

https://crates.io/api/v1/crates/crossbeam-channel/downloads

@HadrienG2
Copy link

HadrienG2 commented Apr 12, 2019

In my case, the crates.io download statistics pretend that the newest versions of my crates were downloaded before they were uploaded:

Unless I missed the release announcement of time travel features in Cargo, it seems likely that the statistics displayed by crates.io are wrong.

@bryanburgers
Copy link
Contributor

I don't think this has anything to do with yanking. I can find crates with no yanks (https://crates.io/crates/lazy_static, https://crates.io/crates/tokio-io-pool) that seem to exhibit the same issue.

bryanburgers added a commit to bryanburgers/crates.io that referenced this issue Apr 22, 2019
Fix the following assertion error that occurs when running the frontend
in debug mode, which cause graphs to not display at all.

> Assertion Failed: You must include an 'id' for version-download in an
> object passed to 'push'

This has been happening since 3c92ca2
landed.

The fix involves telling Ember how to create a unique ID for a
version-download object, using the composite key.

I haven't been able to confirm, but I believe this is the reason that
graphs in production are only ever counting/displaying a single version.
When using this change locally in debug mode against the live website,
the downloads graphs are rendering correctly.

Fixes rust-lang#1704.
@sgrif sgrif mentioned this issue May 7, 2019
bors added a commit that referenced this issue May 13, 2019
Fix assertion error in Ember for version downloads

Fix the following assertion error that occurs when running the frontend in debug mode, which cause graphs to not display at all.

> Assertion Failed: You must include an 'id' for version-download in an object passed to 'push'

This has been happening since 3c92ca2 landed.

The fix involves telling Ember how to create a unique ID for a version-download object, using the composite key.

I haven't been able to confirm, but I believe this is the reason that graphs in production are only ever counting/displaying a single version. When using this change locally in debug mode against the live website, the downloads graphs are rendering correctly.

Fixes #1704.
@sgrif
Copy link
Contributor

sgrif commented May 13, 2019

Fixed by #1728

@sgrif sgrif closed this as completed May 13, 2019
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

Successfully merging a pull request may close this issue.

5 participants