Closed
Bug 1095038
Opened 11 years ago
Closed 11 years ago
Updating collection fails as PUT returns a 500
Categories
(Marketplace Graveyard :: Curation Tools, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
2014-11-11
People
(Reporter: krupa.mozbugs, Assigned: kngo)
References
()
Details
(Keywords: regression)
steps to reproduce:
1. Load https://marketplace.firefox.com/curate/manage/collections/action-games
2. Click Update to save changes
expected behavior:
Save action is successful
actual behavior:
PUT request fails with a 500
"[req] PUTing" "https://marketplace.firefox.com/api/v2/feed/collections/action-games/?_user=---&lang=en-US" include.js:6
"[req] Request failed:" "PUT" 500 include.js:6
"[req] Response data: " "{"detail":"Internal Server Error"}" include.js:6
PUT https://marketplace.firefox.com/api/v2/feed/collections/action-games/ [HTTP/1.1 500 INTERNAL SERVER ERROR 2069ms]
"[forms_transonic] {"apps":[460210],"background_color":"#CE001C","background_image_upload_url":"","type":"promo","description":{"bn-BD":"","ca":"","cs":"","de":"","el":"","en-US":"Heart-pounding good times.","es":"","fr":"","hr":"","hu":"","it":"","ja":"","mk":"","nl":"","pl":"","pt-BR":"","ro":"","ru":"","sr":"","sr-Latn":"","sk":"","tr":"","zh-CN":""},"name":{"bn-BD":"","ca":"","cs":"","de":"","el":"","en-US":"Action Games","es":"","fr":"","hr":"","hu":"","it":"","ja":"","mk":"","nl":"","pl":"","pt-BR":"","ro":"","ru":"","sr":"","sr-Latn":"","sk":"","tr":"","zh-CN":""},"slug":"action-games"}" include.js:6
"[req] PUTing" "https://marketplace.firefox.com/api/v2/feed/collections/action-games/?_user=---&lang=en-US" include.js:6
"[req] Request failed:" "PUT" 500 include.js:6
"[req] Response data: " "{"detail":"Internal Server Error"}"
| Reporter | ||
Comment 1•11 years ago
|
||
Stacktrace (most recent call last):
File "rest_framework/views.py", line 396, in dispatch
response = handler(request, *args, **kwargs)
File "mkt/feed/views.py", line 136, in update
self.set_apps(self.get_object(), apps)
File "mkt/feed/views.py", line 285, in set_apps
super(FeedCollectionViewSet, self).set_apps(obj, apps)
File "mkt/feed/views.py", line 114, in set_apps
obj.set_apps(apps)
File "mkt/feed/models.py", line 145, in set_apps
self.add_app(Webapp.objects.get(pk=app))
File "mkt/feed/models.py", line 113, in add_app
order=order)
File "django/db/models/manager.py", line 157, in create
return self.get_queryset().create(**kwargs)
File "django/db/models/query.py", line 322, in create
obj.save(force_insert=True, using=self.db)
File "django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "django/db/models/base.py", line 573, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "django/db/models/base.py", line 654, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "django/db/models/base.py", line 687, in _do_insert
using=using, raw=raw)
File "django/db/models/manager.py", line 232, in _insert
return insert_query(self.model, objs, fields, **kwargs)
File "django/db/models/query.py", line 1514, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "django/db/models/sql/compiler.py", line 903, in execute_sql
cursor.execute(sql, params)
File "django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "django/db/backends/mysql/base.py", line 124, 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
sentry:http://sentry.mktmon.services.phx1.mozilla.com/mkt/marketplacefirefoxcom/group/9449/
Thanks, Krupa. I bumped this bug to critical, as it blocks a major global collection ("Action Games") that was scheduled to publish today.
Severity: major → critical
| Reporter | ||
Updated•11 years ago
|
OS: Gonk (Firefox OS) → All
Hardware: x86 → All
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → kngo
Priority: -- → P1
| Assignee | ||
Comment 3•11 years ago
|
||
https://github.com/mozilla/zamboni/commit/c2a50162b045279ddeebaaea7cf7ba916db507de
https://github.com/mozilla/zamboni/commit/c5a4f9db030f70a972663f6cb7aef9fc65fbf0a9
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 4•11 years ago
|
||
Also, before the fix lands, I imagine a workaround is to delete the collection and re-create it.
| Assignee | ||
Comment 5•11 years ago
|
||
This is currently on -dev, not yet on stage.
Thanks, Kevin! To make sure I'm clear... you're suggesting that if I delete the current collection and rebuild it it should work? Or should I just wait until after Tuesday's push?
| Assignee | ||
Comment 7•11 years ago
|
||
Yes, I believe the workaround should work. As long as you get it on the first try. After Tuesday, updates will work.
Here's what happened with the workaround:
Collection was created fine with apps content and English title and body copy. But when I entered the first non-English localized copy (I tried Bengali) and hit Update, I got the same failure messages.
Does this shed any new light on the issue?
| Assignee | ||
Comment 9•11 years ago
|
||
Updates aren't working, which is why you'd have to create *everything* in the collection in one go.
Comment 10•11 years ago
|
||
Ah okay. I get it now. I'll give it one more go...
Comment 11•11 years ago
|
||
Seemed to work!
Comment 12•11 years ago
|
||
Updating collections on stage worked fine. I don not have permissions to edit collection in productions.
Krupa can you please help us with this?
Flags: needinfo?(krupa.mozbugs)
| Reporter | ||
Comment 13•11 years ago
|
||
this is working.
Status: RESOLVED → VERIFIED
Flags: needinfo?(krupa.mozbugs)
| Assignee | ||
Comment 14•11 years ago
|
||
Seems to be reproducing: http://sentry.dmz.phx1.mozilla.com/marketplace-stage/marketplace-stage/group/21605/
| Reporter | ||
Comment 15•11 years ago
|
||
(In reply to Kevin Ngo [:ngoke] from comment #14)
> Seems to be reproducing:
> http://sentry.dmz.phx1.mozilla.com/marketplace-stage/marketplace-stage/group/
> 21605/
Tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1101765
You need to log in
before you can comment on or make changes to this bug.
Description
•