Webapp -> Addon migration broke dev

VERIFIED FIXED

Status

P1
blocker
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: mat, Unassigned)

Tracking

Avenir
Points:
---

Details

(Whiteboard: [see comment 2])

(Reporter)

Description

3 years ago
STR:
- Log in on dev using an account with reviewer permissions and go to https://marketplace-dev.allizom.org/reviewers/

Expected:
- You see your reviewer tools dashboard

Actual:
- You see a 500 error page.

Traceback:
http://sentry.dmz.phx1.mozilla.com/marketplace-dev/marketplace-dev/group/28906/



Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/db/transaction.py", line 394, in inner
    return func(*args, **kwargs)
  File "django/db/transaction.py", line 394, in inner
    return func(*args, **kwargs)
  File "newrelic/hooks/framework_django.py", line 499, in wrapper
    return wrapped(*args, **kwargs)
  File "mkt/site/decorators.py", line 31, in wrapper
    return func(request, *args, **kw)
  File "mkt/reviewers/views.py", line 118, in wrapper
    return f(request, *args, **kw)
  File "mkt/reviewers/views.py", line 152, in home
    full_reviewer=acl.check_reviewer(request)
  File "mkt/reviewers/views.py", line 242, in context
    queue_counts=queue_counts(request),
  File "mkt/reviewers/views.py", line 167, in queue_counts
    'abuse': queues_helper.get_abuse_queue().count(),
  File "django/db/models/query.py", line 338, in count
    return self.query.get_count(using=self.db)
  File "django/db/models/sql/query.py", line 436, in get_count
    number = obj.get_aggregation(using=using)[None]
  File "django/db/models/sql/query.py", line 402, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)
  File "django/db/models/sql/compiler.py", line 787, in execute_sql
    cursor.execute(sql, params)
  File "django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "django/db/backends/mysql/base.py", line 129, in execute
    return self.cursor.execute(query, args)
  File "newrelic/hooks/database_dbapi2.py", line 22, in execute
    *args, **kwargs)
  File "MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue



I'm guessing the cause is the merge of https://github.com/mozilla/zamboni/pull/3239 (which, sadly, does not have a bug)
(Reporter)

Comment 1

3 years ago
Missing in that pasted traceback: OperationalError: (1054, "Unknown column 'U0.addon_id' in 'field list'")
(Reporter)

Comment 2

3 years ago
The query :

SELECT COUNT(*) FROM `addons` WHERE (("en-us"="en-us") AND NOT (`addons`.`status` = %s) AND `addons`.`id` IN (SELECT U0.`addon_id` FROM `abuse_reports` U0 INNER JOIN `addons` U1 ON ( U0.`addon_id` = U1.`id` ) WHERE (NOT (U0.`addon_id` IS NULL) AND NOT (U1.`status` = %s) AND U0.`read` = %s)))'

It should not look like this after #3239 was merged. Looks like dev failed to deploy completely and is in a weird state. See https://deploy.mktadm.ops.services.phx1.mozilla.com/job/marketplace-dev.allizom.org-zamboni/966/
(Reporter)

Updated

3 years ago
Severity: normal → blocker
Component: Reviewer Tools → General
Priority: -- → P1
Summary: Reviewer tools throws a 500 error on -dev → Webapp -> Addon migration broke dev
Whiteboard: [see comment 2]
This seems to be a result of the database on -dev being different from stage etc. We're going to try creating a clean db from the last deployed tag then upgrade from there.
(Reporter)

Comment 4

3 years ago
The original symptoms persist on -dev today : I was able to submit an app but not review it. I can't find the sentry traceback, but it might be because of the migration to AWS.
(Reporter)

Comment 5

3 years ago
This is still the same traceback, but here is the sentry link for the new dev on AWS: https://sentry.prod.mozaws.net/operations/zamboni/group/111735/
(Reporter)

Comment 6

3 years ago
Seems fixed now ?
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME

Comment 7

3 years ago
This issue is happening now on MP-stage FF43(Win 7).
Reviewer Tools page cannot be accessed. (500 error code)
Please see the screencast: http://screencast.com/t/OmXMGTijx
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Comment 8

3 years ago
I receive a 500 error, when trying to submit a report, for websites or apps, on both device and desktop using MP-stage. Let me know if this needs a separate issue to be logged.
Please see the creencast for this issue: http://screencast.com/t/cqOEfqNKXme

Comment 9

3 years ago
I can see a 500 error when trying to open apps from Lookup Tools on Stage too : http://screencast.com/t/Xg480ik2h4Jp
Migration didn't get completely reverted on stage; manually fixed now.
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED

Comment 11

3 years ago
Verified as fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.