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)

defect

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"}"
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
OS: Gonk (Firefox OS) → All
Hardware: x86 → All
Assignee: nobody → kngo
Priority: -- → P1
Also, before the fix lands, I imagine a workaround is to delete the collection and re-create it.
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?
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?
Updates aren't working, which is why you'd have to create *everything* in the collection in one go.
Ah okay. I get it now. I'll give it one more go...
Seemed to work!
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)
this is working.
Status: RESOLVED → VERIFIED
Flags: needinfo?(krupa.mozbugs)
You need to log in before you can comment on or make changes to this bug.