Closed
Bug 1113111
Opened 11 years ago
Closed 9 years ago
tracebacks when a platform exists in a blob but has no locales
Categories
(Release Engineering Graveyard :: Applications: Balrog (backend), defect)
Release Engineering Graveyard
Applications: Balrog (backend)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: vjoshi, Mentored)
Details
Attachments
(1 file)
|
1.01 KB,
patch
|
Details | Diff | Splinter Review |
I noticed this in Sentry today:
KeyError: 'locales'
Stacktrace (most recent call last):
File "flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "flask/views.py", line 84, in view
return self.dispatch_request(*args, **kwargs)
File "flask/views.py", line 149, in dispatch_request
return meth(*args, **kwargs)
File "auslib/web/views/client.py", line 35, in get
release, update_type = AUS.evaluateRules(query)
File "auslib/AUS.py", line 86, in evaluateRules
if not blob.shouldServeUpdate(updateQuery):
File "auslib/blobs/apprelease.py", line 151, in shouldServeUpdate
if updateQuery['buildID'] >= self.getBuildID(updateQuery['buildTarget'], updateQuery['locale']):
File "auslib/blobs/apprelease.py", line 63, in getBuildID
if locale not in self['platforms'][platform]['locales']:
All of which come from URLs like:
https://aus4.mozilla.org/update/4/Fennec/35.0/20141211142105/Android_x86-gcc3/en-US/beta/4.4.2/default/default/35.0/update.xml
Which gets a blob with a section like:
"Android_x86-gcc3": {
"OS_FTP": "android-x86",
"OS_BOUNCER": "android-x86"
}
Setting aside whether or not Android_x86-gcc3 should be getting updates, I'm not 100% sure whether we need to deal with this in Balrog, or in the submitter tools. It feels like a bit of an invalid state to have a platform with absolutely no data in it.
| Reporter | ||
Comment 1•11 years ago
|
||
Diving into this a bit more I see that all of the URLs currently triggering this Traceback are Android_x86-gcc3, en-US. This is because the release creator iterates on enUSPlatforms (https://github.com/mozilla/build-tools/blob/master/lib/python/balrog/submitter/cli.py#L67), which contains android-x86 for Fennec (https://github.com/mozilla/build-buildbot-configs/blob/master/mozilla/release-fennec-mozilla-beta.py.template#L70). We can't adjust that because it's used for things like creating en-US release build factories (https://github.com/mozilla/build-buildbotcustom/blob/63911e42bb49817f05eee964a66c1bc13c1b3457/process/release.py#L590) so the simplest solution might be to have balrog cope better in some way. Might be as simple as .get(platform, {}) ?
Comment 2•11 years ago
|
||
The en-US build may not be submitting info for some reason, and locales are also planned, so this should go away when those are resolved. Still, modifying
https://github.com/mozilla/balrog/blob/master/auslib/blobs/apprelease.py#L47
to add the get you suggest is a good idea.
Comment 3•11 years ago
|
||
| Reporter | ||
Updated•9 years ago
|
Mentor: bhearsum
| Assignee | ||
Comment 4•9 years ago
|
||
This should get rid of the KeyError. I added a get method access for both platform and 'locales'.
| Reporter | ||
Updated•9 years ago
|
Assignee: nobody → varunj.1011
| Assignee | ||
Updated•9 years ago
|
Attachment #8724795 -
Flags: review?(bhearsum)
| Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8724795 [details] [diff] [review]
Changes dict access to use the get method
Reviewed in the PR. In the future, you can post a link to the PR as a review request!
Attachment #8724795 -
Flags: review?(bhearsum)
Comment 6•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/balrog
https://github.com/mozilla/balrog/commit/655901440b6ed7d146a2813e23739c1e7439006a
Bug 1113111 - tracebacks when a platform exists in a blob but has no locales.r=bhearsum
https://github.com/mozilla/balrog/commit/ce2b4476a30dcf2e4ded0bb269308a12e79c473b
Merge pull request #54 from nurav/master
Bug 1113111 - tracebacks when a platform exists in a blob but has no locales. r=bhearsum
| Reporter | ||
Comment 7•9 years ago
|
||
I won't be doing a push to prod just for this, so this bug will stay open until there's a push for some other reason.
| Reporter | ||
Comment 8•9 years ago
|
||
This landed in production today. Thanks for the patch!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Release Engineering → Release Engineering Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•