Missing attributes in ES results cause front page marketplace crash

VERIFIED FIXED in 2013-07-18

Status

P1
major
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: oremj, Assigned: robhudson)

Tracking

2013-07-18
x86
Mac OS X
Points:
---

Details

(Whiteboard: [qa-])

(Reporter)

Description

5 years ago
https://github.com/mozilla/zamboni/blob/89a0e6d6e22a91305501064d6e8af07d884a8568/mkt/webapps/utils.py#L180

If any of those attrs are not returned in the ES response, the api will return 500 and the entire marketplace front page will fail.

Traceback:

/api/v1/fireplace/search/featured/: AttributeError 
['  File "/data/mkt.prod/www/marketplace.firefox.com/deploy-zamboni-prod-20130712214135-89a0e6d6e2/venv/lib/python2.6/site-packages/tastypie/resources.py", line 192, in wrapper\n    response = callback(request, *args, **kwargs)\n', '  File "/data/mkt.prod/www/marketplace.firefox.com/deploy-zamboni-prod-20130712214135-89a0e6d6e2/venv/lib/python2.6

Stacktrace (most recent call last):

  File "tastypie/resources.py", line 192, in wrapper
    response = callback(request, *args, **kwargs)
  File "tastypie/resources.py", line 397, in dispatch_list
    return self.dispatch('list', request, **kwargs)
  File "mkt/api/base.py", line 97, in dispatch
    .dispatch(request_type, request, **kwargs))
  File "tastypie/resources.py", line 427, in dispatch
    response = method(request, **kwargs)
  File "mkt/search/api.py", line 110, in get_list
    page['objects'] = [self.full_dehydrate(bundle) for bundle in objs]
  File "tastypie/resources.py", line 662, in full_dehydrate
    bundle = self.dehydrate(bundle)
  File "mkt/search/api.py", line 123, in dehydrate
    request=bundle.request))
  File "mkt/webapps/utils.py", line 183, in es_app_to_dict
    data = dict(zip(attrs, attrgetter(*attrs)(obj)))
  File "elasticutils/__init__.py", line 1809, in __getattr__
    raise AttributeError
(Assignee)

Updated

5 years ago
Assignee: nobody → robhudson.mozbugs
Priority: -- → P1
Target Milestone: --- → 2013-07-18
(Assignee)

Comment 1

5 years ago
https://github.com/mozilla/zamboni/commit/8cab70e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 2

5 years ago
Can you please add some STRs to this bug or mark it as [qa-] ?
(Assignee)

Updated

5 years ago
Whiteboard: [qa-]
marketplace-dev is/has been looking good, since:

[11:26:50.259] GET https://marketplace-dev.allizom.org/ [HTTP/1.1 200 OK 133ms]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.