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

Stats are missing from the homepage #10318

Open
RayBB opened this issue Jan 12, 2025 · 7 comments
Open

Stats are missing from the homepage #10318

RayBB opened this issue Jan 12, 2025 · 7 comments
Assignees
Labels
Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 4 An issue, but should be worked on when no other pressing work can be done. [managed] Type: Bug Something isn't working. [managed]

Comments

@RayBB
Copy link
Collaborator

RayBB commented Jan 12, 2025

Problem

Originally posted in Slack here

The stats about users/edits/etc are missing from the homepage.

Could be related to #10179

Reproducing the bug

  1. Go to ...
  2. Do ...
  • Expected behavior:
  • Actual behavior:

Context

  • Browser (Chrome, Safari, Firefox, etc):
  • OS (Windows, Mac, etc):
  • Logged in (Y/N):
  • Environment (prod, dev, local): prod

Breakdown

Requirements Checklist

  • [ ]

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
@RayBB RayBB added Type: Bug Something isn't working. [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jan 12, 2025
@mekarpeles
Copy link
Member

It may need a recache 🤔 or it may be related to #10206 (crons for stats seem to be running both on ol-home0 baremetal and cron container...

@mekarpeles mekarpeles added Priority: 4 An issue, but should be worked on when no other pressing work can be done. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jan 12, 2025
@techy4shri
Copy link
Contributor

techy4shri commented Jan 14, 2025

Is it different on the deployed website? Because I am running the local development (with full setup)and can see the stats:
image
Unless this is about some other stats?

@RayBB
Copy link
Collaborator Author

RayBB commented Jan 14, 2025

Stats like those should be showing on the openlibrary.org site not just local host

@techy4shri
Copy link
Contributor

I mean, I see those are under templates folder, and the inspect shows stats for local and then it doesn't for live so perhaps that could be a reason? Still looking at folders and files though.

@cdrini
Copy link
Collaborator

cdrini commented Jan 14, 2025

Relevant error in sentry:

AttributeError: 'ThreadedDict' object has no attribute 'features'

image

@schu96
Copy link
Contributor

schu96 commented Jan 14, 2025

Hm that's interesting, I did not expect that to be the source of the issue.

@RayBB @cdrini Could I be assigned this issue? The fix that I have off the top of my head would be something along the lines of

if "features" in web.ctx:
  stats = admin.get_stats(use_mock_data=("dev" in web.ctx.features))
else: 
  stats = admin.get_stats()

@RayBB
Copy link
Collaborator Author

RayBB commented Jan 15, 2025

@schu96 assigned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 4 An issue, but should be worked on when no other pressing work can be done. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

5 participants