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

Trending Projects are not updated #3455

Closed
pradyunsg opened this issue Mar 28, 2018 · 9 comments · Fixed by #3457
Closed

Trending Projects are not updated #3455

pradyunsg opened this issue Mar 28, 2018 · 9 comments · Fixed by #3457
Labels

Comments

@pradyunsg
Copy link
Contributor

I think in the past month that I've been looking at pypi.org (and even before that), the "Trending Projects" haven't changed.

@pradyunsg
Copy link
Contributor Author

Looking further, as someone not familiar with the codebase, it seems like the compute_trending task isn't setup to run every day or something like that.

@brainwane
Copy link
Contributor

Potentially another reason for #3252.

@brainwane brainwane added requires triaging maintainers need to do initial inspection of issue search Elasticsearch, search filters, and so on bug 🐛 labels Mar 28, 2018
@ewdurbin
Copy link
Member

pypi-warehouse-worker-beat-856f489568-kjc9b worker-beat [2018-03-28 03:00:00,064: INFO/MainProcess] Loading 1 tasks
pypi-warehouse-worker-beat-856f489568-kjc9b worker-beat [2018-03-28 03:00:00,071: INFO/MainProcess] Scheduler: Sending due task warehouse.packaging.tasks.compute_trending() (warehouse.packaging.tasks.compute_trending)

I do see the task being enqueued.

@ewdurbin
Copy link
Member

pypi-warehouse-worker-7b6dddfb-tlm4s worker FileNotFoundError: [Errno 2] No such file or directory: '/app/gcloud.json'

Looks like pathing is goof'd! will fixup!

@ewdurbin ewdurbin removed requires triaging maintainers need to do initial inspection of issue search Elasticsearch, search filters, and so on labels Mar 28, 2018
@ewdurbin
Copy link
Member

That was half the issue :)

Second half is they changed the API! https://github.com/GoogleCloudPlatform/google-cloud-python/blob/cd9b89ead0be95827c9eac5a9a8c5d8fdaee3cae/bigquery/CHANGELOG.md#interface-changes--breaking-changes-1

pypi-warehouse-worker-5c996d6869-6hbkc worker [2018-03-28 16:03:30,528: ERROR/ForkPoolWorker-2] Task warehouse.packaging.tasks.compute_trending[e6d5d345-bfb9-4fd1-a535-af52c2b1a495] raised unexpected: AttributeError("'Client' object has no attribute 'run_sync_query'",)
pypi-warehouse-worker-5c996d6869-6hbkc worker Traceback (most recent call last):
pypi-warehouse-worker-5c996d6869-6hbkc worker   File "/opt/warehouse/lib/python3.6/site-packages/celery/app/trace.py", line 374, in trace_task
pypi-warehouse-worker-5c996d6869-6hbkc worker     R = retval = fun(*args, **kwargs)
pypi-warehouse-worker-5c996d6869-6hbkc worker   File "/opt/warehouse/src/warehouse/tasks.py", line 70, in __call__
pypi-warehouse-worker-5c996d6869-6hbkc worker     return super().__call__(*(self.get_request(),) + args, **kwargs)
pypi-warehouse-worker-5c996d6869-6hbkc worker   File "/opt/warehouse/lib/python3.6/site-packages/celery/app/trace.py", line 629, in __protected_call__
pypi-warehouse-worker-5c996d6869-6hbkc worker     return self.run(*args, **kwargs)
pypi-warehouse-worker-5c996d6869-6hbkc worker   File "/opt/warehouse/src/warehouse/tasks.py", line 58, in run
pypi-warehouse-worker-5c996d6869-6hbkc worker     return original_run(*args, **kwargs)
pypi-warehouse-worker-5c996d6869-6hbkc worker   File "/opt/warehouse/src/warehouse/packaging/tasks.py", line 21, in compute_trending
pypi-warehouse-worker-5c996d6869-6hbkc worker     query = bq.run_sync_query(
pypi-warehouse-worker-5c996d6869-6hbkc worker AttributeError: 'Client' object has no attribute 'run_sync_query'

@brainwane
Copy link
Contributor

(@pradyunsg -- good catch and thanks for the report!)

@ewdurbin
Copy link
Member

Confirmed fixed.

@pradyunsg
Copy link
Contributor Author

Yay! Thanks @ewdurbin @dstufft @brainwane for the fix. ^>^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants