Closed Bug 765311 Opened 13 years ago Closed 13 years ago

Statistics causes 500 error on Affiliates-dev

Categories

(Firefox Affiliates Graveyard :: affiliates.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: osmose, Assigned: osmose)

References

()

Details

(Whiteboard: [release:3])

Attachments

(1 file)

Attached image Screenshot of error.
The AJAX request that powers that Statistics Display on the Affiliates logged-in pages is showing the error "Statistics are currently unavailable" and throwing the following traceback: Traceback (most recent call last): File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/views/decorators/http.py", line 45, in inner return func(request, *args, **kwargs) File "/data/www/affiliates-dev.allizom.org/affiliates-app/apps/shared/decorators.py", line 11, in decorator return view_func(request, *args, **kwargs) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/views/decorators/cache.py", line 66, in _cache_controlled response = viewfunc(request, *args, **kw) File "/data/www/affiliates-dev.allizom.org/affiliates-app/apps/badges/views.py", line 98, in month_stats_ajax request.user, request.POST['month'], request.POST['year']) File "/data/www/affiliates-dev.allizom.org/affiliates-app/apps/badges/models.py", line 190, in total_for_user_period year=year) File "/data/www/affiliates-dev.allizom.org/affiliates-app/apps/badges/models.py", line 198, in _total results = clickstats.aggregate(models.Sum('clicks')) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/db/models/query.py", line 321, in aggregate return query.get_aggregation(using=self.db) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/db/models/sql/query.py", line 367, in get_aggregation result = query.get_compiler(using).execute_sql(SINGLE) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/db/models/sql/compiler.py", line 735, in execute_sql cursor.execute(sql, params) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor-local/src/django-statsd/django_statsd/patches/utils.py", line 7, in wrapped return method(*args, **kw) File "/data/www/affiliates-dev.allizom.org/affiliates-app/vendor/src/django/django/db/backends/mysql/base.py", line 86, in execute return self.cursor.execute(query, args) File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute self.errorhandler(self, exc, value) File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1054, "Unknown column 'badges_clickstats.year' in 'where clause'")
It looks like the database migrations for bug 713040 were run, but the code wasn't pushed to dev. I've filed bug 765327 with IT to get the push logs so we can pin down the error.
With the resolution of 765327 and the fixed migrations in https://github.com/mozilla/affiliates/commit/601f6b33f062c86320681ad0cde60ad901fba7ab, this issue appears to be fixed and I'm not getting any errors from -dev anymore. :D
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Websites → Firefox Affiliates
Bumping to verfied -- we haven't seen this traceback in /forever/ + the the code base has changed since then.
Status: RESOLVED → VERIFIED
Product: Firefox Affiliates → Firefox Affiliates Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: