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

500 error on pages showing Activity Log for a Rating posted before October 2017 #8302

Closed
diox opened this issue Apr 16, 2021 · 5 comments · Fixed by mozilla/addons-server#16966

Comments

@diox
Copy link
Member

diox commented Apr 16, 2021

https://sentry.prod.mozaws.net/operations/olympia-prod/issues/11085753/?referrer=github_plugin

LookupError: No installed app with label 'reviews'

KeyError: 'reviews'
  File "django/apps/registry.py", line 155, in get_app_config
    return self.app_configs[app_label]

LookupError: No installed app with label 'reviews'.
(8 additional frame(s) were not displayed)
...
  File "olympia/amo/models.py", line 54, in _fetch_all
    func(self._result_cache)
  File "olympia/activity/models.py", line 233, in default_transformer
    ActivityLog.arguments_builder(logs)
  File "olympia/activity/models.py", line 442, in arguments_builder
    model = apps.get_model(app_label, model_name)
  File "django/apps/registry.py", line 205, in get_model
    app_config = self.get_app_config(app_label)
  File "django/apps/registry.py", line 162, in get_app_config
    raise LookupError(message)

Regression mozilla/addons-server#16893, which seems fairly uncommon: my guess is that it will only happen if you have extremely old activity in your feed (from before the reviews -> ratings renaming)

@diox diox self-assigned this Apr 16, 2021
@diox diox added this to the 2021.04.22 milestone Apr 16, 2021
@eviljeff
Copy link
Member

#4937 for the reviews->ratings change. Would potentially 500 any page where we show the activity log to the user? or just /developers/feed/ ?

@diox
Copy link
Member Author

diox commented Apr 16, 2021

Possibly any page showing an activity log from before October 2017 because I messed up the way it's translated:
https://github.com/mozilla/addons-server/pull/16893/files#diff-473099b78767e3b276d5318cfc57013234fbd9653c1368e053bda0674484125fR440

It's more likely to affect developer feed, but technically can happen anywhere.

@diox diox changed the title 500 in developer feed (LookupError: No installed app with label 'reviews') 500 error on pages showing Activity Log for a Rating posted before October 2017 Apr 16, 2021
@diox
Copy link
Member Author

diox commented Apr 16, 2021

Bumping priority as a result. It should be simple to fix (but we can't just revert that bit: it's important that key is translated as well)

@diox
Copy link
Member Author

diox commented Apr 19, 2021

QA:

  • Post a rating for an add-on
  • Check that "recent changes" in devhub dashboard for the developer of the add-on works and shows that activity. Same for the recent changes on the add-on itself in devhub, as well as review log in reviewer tools.
  • Contact me on Matrix to test further (the original problem can only be reproduced with the data in the database in a specific state)

@AlexandraMoga
Copy link

We've tested with a few ratings and confirmed that the following areas are working as expected:

  • the Recent changes section in DevHub - Manage my submissions page (entry for the rating posted is displayed)
  • the Recent activity for all developer add-ons page (entry for the rating posted is displayed)
  • the Recent changes for a particular add-on (entry for the rating posted is displayed)
  • the Add-on Review Log in Reviewer Tools can be loaded when it includes an entry for the add-ons used in these tests

This issue is verified fixed on -dev.

@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
@KevinMind KevinMind added repository:addons-server Issue relating to addons-server migration:2024 labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants