pymemcache regression in SnapStoreClient.listChannels
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Jürgen Gmach |
Bug Description
After rolling out the switch to pymemcache (see https:/
TypeError: the JSON object must be str, not 'bytes'
Traceback (most recent call last):
Module zope.publisher.
result = publication.
Module lp.services.
return mapply(ob, request.
Module zope.publisher.
return debug_call(obj, args)
- __traceback_info__: <security proxied zope.browserpag
Module zope.publisher.
return obj(*args)
Module lp.services.
self.
Module lp.app.
self.
Module lp.snappy.
super(
Module lp.snappy.
super(
Module lp.app.
ignore_
Module zope.formlib.form, line 308, in setUpWidgets
widget.
Module lp.snappy.
self.
Module lp.snappy.
self, field.__name__, field, IInputWidget, prefix=self.name)
Module zope.formlib.
widget = widget(
Module zope.schema._field, line 768, in bind
clone.
Module zope.schema._field, line 466, in bind
vocabulary = clone.vocabulary = clone._
Module zope.schema._field, line 450, in _resolve_vocabulary
vocabulary = vr.get(
Module zope.vocabulary
return factory(context)
Module lp.snappy.
channels = getUtility(
Module lp.snappy.
channels = json.loads(
Module json, line 312, in loads
s._
TypeError: the JSON object must be str, not 'bytes'
We rolled back due to the combination of this and a firewall issue that caused private PPA authentication to break (the latter is being fixed by IS).
Related branches
- Colin Watson (community): Approve
-
Diff: 291 lines (+88/-42)7 files modifiedlib/lp/code/model/branch.py (+7/-11)
lib/lp/code/model/gitref.py (+5/-12)
lib/lp/services/memcache/client.py (+44/-2)
lib/lp/services/memcache/testing.py (+2/-1)
lib/lp/services/memcache/tests/test_memcache_client.py (+20/-0)
lib/lp/services/memcache/timeline.py (+4/-4)
lib/lp/snappy/model/snapstoreclient.py (+6/-12)
Changed in launchpad: | |
status: | Triaged → Fix Committed |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Changed in launchpad: | |
status: | Fix Released → Fix Committed |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
It seems that we were one upstream version behind on python-memcached, and that upstream version included https:/ /github. com/linsomniac/ python- memcached/ pull/135, which added the flag to indicate that stored data corresponded to a text value. So we'll have to explicitly decode when we know that we expect to find text; I think that goes for most of our uses of memcache, except for `LaunchpadRootI ndexView` which seems to store a pickled array (probably unintentionally as we normally prefer JSON to pickle whenever possible).