Make it easier to update product versions

RESOLVED FIXED in 5.12.5

Status

addons.mozilla.org Graveyard
Developer Pages
P3
normal
RESOLVED FIXED
8 years ago
3 years ago

People

(Reporter: jbalogh, Assigned: basta)

Tracking

Details

(Reporter)

Description

8 years ago
We should get this from AMO, and I probably need to make you an API endpoint to expose it.  AMO can return a JSON file that you can save to disk.
Priority: -- → P4
Target Milestone: 5.12.1 → 4.x (triaged)
Assignee: mbasta → jbalogh
Target Milestone: 4.x (triaged) → 5.12.3
-> jeff for the json
Let's manage this by hand until we get this API up.
Target Milestone: 5.12.3 → 4.x (triaged)
Priority: P4 → P3
Target Milestone: 4.x (triaged) → 5.12.4
(Reporter)

Comment 3

8 years ago
I have a command that will dump a json file like the attachment.  The validator should read a json file like that instead of having the apps and versions hard-coded.

The file path should be a constant defined somewhere in the validator that I can monkeypatch.  AMO will import the validator and point it at the versions file we're going to update on a cron job.

The structure of the json is

{id: {guid: "{..}", versions: [..]}, ...}

Firefox starts out like this:

{"1": {"guid": "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}", "versions": ["0.3", "0.6", ...]}, ...}
Assignee: jbalogh → mbasta
Target Milestone: 5.12.4 → 5.12.5
(Assignee)

Comment 4

8 years ago
This is done but I need to write tests. When launching from the command line, use the "approved_applications" command line argument.

I also updated the validate.validate() function to make it easier to implement in Zamboni:

https://github.com/mattbasta/amo-validator/commit/3e976845bcb1929323282317f15cea5370b49cc7

You can just pass validate.validate("foo.bar", approved_applications="path/to/json").

By default, the validator will fall back on the values that I'd previously had in the targetapplication.py file.

Let me know if there's anything else, otherwise this is good to go.
(Assignee)

Comment 5

8 years ago
Jeff: I updated the validate.py file with your suggestions.

https://github.com/mattbasta/amo-validator/commit/ccfbc81d9b3e0382154b920a6742cbe69cd3ea6a
(Assignee)

Comment 6

8 years ago
There are tests for this and everything passes:

https://github.com/mattbasta/amo-validator/commit/be849f49b54faa5324633730d930deaf1d034ae9
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.