Closed
Bug 772857
Opened 12 years ago
Closed 12 years ago
Let the validator have JSON apps in multiple data centers
Categories
(addons.mozilla.org Graveyard :: Add-on Validation, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kumar, Unassigned)
References
Details
When AMO/mkt runs in multiple data centers the current method of passing a JSON file of apps to the validator will not work. This needs to be fixed in two ways:
1) AMO/mkt needs to use the storage API for writing/reading the apps JSON file
2) the main validator function needs to accept a JSON object of apps, not a filename
See this diff for clues on moving AMO/mkt to use the storage API https://github.com/mozilla/zamboni/commit/4220ef2c0dad92e693803c780c1b0a4e8a2218bd#commitcomment-1563995
These places are where AMO/mkt currently sends the JSON filename to the validator:
https://github.com/mozilla/zamboni/blob/master/apps/devhub/tasks.py#L151
https://github.com/mozilla/zamboni/blob/master/mkt/developers/tasks.py#L162
Comment 1•12 years ago
|
||
Updated the validator to accept JSON strings and return JSON strings:
https://github.com/mozilla/amo-validator/pull/171
Comment 2•12 years ago
|
||
Updated the pull request with updated docs, better tests, and the ability to pass the approved_applications as a dict.
Comment 3•12 years ago
|
||
Merged the pull:
https://github.com/mozilla/amo-validator/commit/82d71f24c143f7b85957bb2296d9d3d4d05e9aaa
Allen: You want to handle the updates to zamboni or do you want a hand?
Comment 4•12 years ago
|
||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•12 years ago
|
||
ok, here's what we can do now:
in the AMO validator (https://github.com/mozilla/zamboni/blob/master/apps/devhub/tasks.py#L101) we can pass in dict of approved_apps. We still need to pass in a temporary filename for the XPI itself though.
In the mkt validator (https://github.com/mozilla/zamboni/blob/master/mkt/developers/tasks.py#L107) we can call the new validate_apps() method and pass in a dict of the JSON manifest, no need for any temporary files.
Comment 7•12 years ago
|
||
Just as a correction: `validate_apps()` accepts a JSON string for its `data` parameter, not a dict. This way, we can return errors about the well-formedness of the JSON itself.
Comment 8•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•