Closed Bug 672338 Opened 13 years ago Closed 13 years ago

Adjust amo-validator to support web apps

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: basta)

References

Details

We should add web app support to the validator.  This is a single file that gets passed in, so I hope it'll be relatively simple to validate.  Tier 1 stuff should be "is the file valid json" and such.  The rest of the rules can be had from the spec:

https://developer.mozilla.org/en/OpenWebApps/The_Manifest

From a quick pass through the spec the rules are pretty clear but I'm sure stuff will come up - please ask for clarification.
Blocks: 672331
Does this make sense in the add-on validator? It could be done as a couple functions in a single file; lumping it into the validator seems like more work than it's worth.
Keeping all our validation in one spot is a valiant goal.  Why wouldn't you put it in the validator?
We can assume it's going to get more and more complicated as time goes on and i don't think it will have much in similar with the add-on validator. Just to be annoying I'd vote for a seperate app validator library.
Let's keep it in the validator for now.  If apps end up being able to be zip files we'll appreciate the framework being there.  If they don't, then we have "a couple functions in a single file" in the validator and it'll mostly be out of the way.
(In reply to comment #2)
> Keeping all our validation in one spot is a valiant goal.  Why wouldn't you
> put it in the validator?

It feels like bad design to stuff everything into the *addon* validator. Just because AMO is doing that doesn't mean it's useful downstream.

Also, one of the apps team's goals is to have a "reference implementation" app store. I think it would be nice to go for that when we can, and having a standalone app validator seems like an easy target.
The phrase "addon validator" is nowhere in the project's docs: https://github.com/mozilla/amo-validator

It's pretty safe to say our app store is going to share a lot of AMO code and, additionally, nothing is preventing someone from using only the app-validating part of the validator.  If you'd like to discuss more, let's do it on IRC.
For the record, the validator also does validation on search providers, which are pretty much at the same level as app manifests (they're just XML).

In terms of integration, adding web apps is going to do three things:
1.) Add a new constant to allow the type detection module to identify web apps.
2.) Add a module which validates the nodes of the manifest. Probably 250 LoC, max.
3.) Add a snippet that passes the web app to the new web app validation module.

The implementation is going to be incredibly simple one way or another.
Target Milestone: 6.1.7 → 6.1.8
Merged:

https://github.com/mozilla/amo-validator/commit/ff7c9034fd73a98ce9f58dcb6983cb7e93ef8a38
Status: NEW → RESOLVED
Closed: 13 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.