Closed
Bug 862418
Opened 13 years ago
Closed 13 years ago
make the build more strict with bad metadata.json files
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(blocking-b2g:-, b2g18+ fixed, b2g18-v1.0.1 fixed)
RESOLVED
FIXED
| blocking-b2g | - |
People
(Reporter: julienw, Assigned: julienw)
Details
(Whiteboard: u=fx-os-user c=may-6-17 p=1)
Attachments
(1 file, 2 obsolete files)
|
8.60 KB,
patch
|
julienw
:
review+
|
Details | Diff | Splinter Review |
We found that in some partner customizatons (eg [1]) the metadata.json files are wrong.
I'd like that we make the build stricter now so that we don't have strange builds later:
- make the manifestURL property mandatory, and fail if this is missing. (instead of having a magic concatenation)
- check that the origin is a real origin (ie: no path at the end). Investigate if we can infer this origin from the manifestURL.
- issue a warning when the manifestURL is an "app://" url, because this makes the packaged app unupdatable (which is sometimes desirable).
[1] https://github.com/telefonicaid/firefoxos-gaia-spain
Asking tef+ on this because while it's npotb I want that our partners are aware of this, and I want to prioritize this.
| Assignee | ||
Updated•13 years ago
|
blocking-b2g: --- → tef?
Comment 1•13 years ago
|
||
FWIW, I think this is a good idea to do for defect prevention, but I don't think a makefile protection in itself should block the release. But I definitely suggest going forward implementing this.
Comment 2•13 years ago
|
||
thank you Julien for telling me about origin incorrect things. I also filed bugs on telefonica repositories and gaia-preload-app for incorrect origin.
https://github.com/yurenju/gaia-preload-app/issues/5
https://github.com/telefonicaid/firefoxos-gaia-spain/issues/2
https://github.com/telefonicaid/firefoxos-gaia-latam/issues/2
Updated•13 years ago
|
Blocks: b2g-apps-v1-next
Comment 3•13 years ago
|
||
We won't block on this, but we'll track this so we get to this in future releases.
blocking-b2g: tef? → -
tracking-b2g18:
--- → +
Comment 4•13 years ago
|
||
Fixed it on gaia-preload-app and I will make new version for telefonica repository on bug 864617.
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → felash
| Assignee | ||
Comment 5•13 years ago
|
||
another check we need to do :
* check that we have a manifest.webapp
Comment 6•13 years ago
|
||
should we check etag in metadata.json?
Comment 7•13 years ago
|
||
(In reply to Yuren Ju [:yurenju] from comment #6)
> should we check etag in metadata.json?
I don't think. We don't want to do network access at build time.
Updated•13 years ago
|
Whiteboard: u=fx-os-user c=may-6-17 p=0
Updated•13 years ago
|
Whiteboard: u=fx-os-user c=may-6-17 p=0 → u=fx-os-user c=may-6-17 p=1
| Assignee | ||
Comment 8•13 years ago
|
||
* be stricter about metadata.json data
* fix the apps we have in the tree
---
build/webapp-manifests.js | 91 +++++++++++++++++++------
test_external_apps/hoststubtest/metadata.json | 2 +-
test_external_apps/mochitest/metadata.json | 3 +-
3 files changed, 75 insertions(+), 21 deletions(-)
Attachment #750509 -
Flags: review?(fabrice)
Comment 9•13 years ago
|
||
Comment on attachment 750509 [details] [diff] [review]
patch v1
Review of attachment 750509 [details] [diff] [review]:
-----------------------------------------------------------------
Please use nsIURI for all the uri checks instead of string based manipulation.
Attachment #750509 -
Flags: review?(fabrice) → review-
| Assignee | ||
Comment 10•13 years ago
|
||
* be stricter about metadata.json data
* fix the apps we have in the tree
---
build/webapp-manifests.js | 95 ++++++++++++++++++++-----
test_external_apps/hoststubtest/metadata.json | 2 +-
test_external_apps/mochitest/metadata.json | 3 +-
3 files changed, 79 insertions(+), 21 deletions(-)
Now uses nsIURI, thanks for the great suggestion.
Attachment #750509 -
Attachment is obsolete: true
Attachment #751059 -
Flags: review?(fabrice)
Comment 11•13 years ago
|
||
Comment on attachment 751059 [details] [diff] [review]
patch v2
Review of attachment 751059 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits fixed.
::: build/webapp-manifests.js
@@ +4,5 @@
> //dump('-*- webapp-manifest.js: ' + msg + '\n');
> }
>
> +let io = Components.classes['@mozilla.org/network/io-service;1']
> + .getService(Components.interfaces.nsIIOService);
nit: s/Components.classes/Cc, and align .getService with ['@mozilla.org/network...
@@ +135,5 @@
> + 'mandatory manifestURL property.');
> + return;
> + }
> +
> + let manifestURLURI;
very weird variable name. What about manifestURI ?
Comment 12•13 years ago
|
||
Comment on attachment 751059 [details] [diff] [review]
patch v2
Review of attachment 751059 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits fixed.
::: build/webapp-manifests.js
@@ +4,5 @@
> //dump('-*- webapp-manifest.js: ' + msg + '\n');
> }
>
> +let io = Components.classes['@mozilla.org/network/io-service;1']
> + .getService(Components.interfaces.nsIIOService);
nit: s/Components.classes/Cc, and align .getService with ['@mozilla.org/network...
@@ +135,5 @@
> + 'mandatory manifestURL property.');
> + return;
> + }
> +
> + let manifestURLURI;
very weird variable name. What about manifestURI ?
Attachment #751059 -
Flags: review?(fabrice) → review+
| Assignee | ||
Comment 13•13 years ago
|
||
fixed nits, carrying r=fabrice
PR in https://github.com/mozilla-b2g/gaia/pull/9862 to see if Travis is happy
Attachment #751059 -
Attachment is obsolete: true
Attachment #751347 -
Flags: review+
| Assignee | ||
Comment 14•13 years ago
|
||
master: 7d8f462d9402c306fa243c96c3d660a399128acc
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 15•13 years ago
|
||
a=npotb
v1-train: 9380ceb81b3eac45861b8d1be07ab7f748ed52a3
v1.0.1: 62a6ed13e3e135e7183a1af2eef3b55f5ffb0378
status-b2g18:
--- → fixed
status-b2g18-v1.0.1:
--- → fixed
Updated•13 years ago
|
No longer blocks: b2g-apps-v1-next
You need to log in
before you can comment on or make changes to this bug.
Description
•