Validate message schemas
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: barret, Assigned: barret)
References
(Blocks 2 open bugs)
Details
Attachments
(4 files, 1 obsolete file)
At present we do not do any validation of message schemas, but we should start so we can handle schema divergence, etc. gracefully.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Depends on D138924
Assignee | ||
Comment 2•2 years ago
|
||
In migrating from Ajv 6 to @cfworker/json-schema, some schemas will no longer
validate due to the format: uri
annotation only being a suggestion for
strings in Ajv 6. Our URLs that use %PLACEHOLDERS% (e.g., %LOCALE%
) will not
pass validation as URIs due to being interpreted as invalid URL encoding.
Here we add a facade in front of @cfworker/json-schema which defines a
moz-url-format
format for strings, which runs them through
Services.urlFormatter.formatURL before attempting to validate them as URIs. We
don't simply find-replace all %PLACEHOLDERS% because the URL formatter service
only supports certain variables and will leave undefined variables as-is,
leading to a validation error (which is what we want).
Depends on D138925
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D138926
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D138927
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Comment on attachment 9264204 [details]
Bug 1752665 - Provide a JsonSchema module that supports additional Mozilla-specific formats r?gijs!,andreio!
Revision D138926 was moved to bug 1757809. Setting attachment 9264204 [details] to obsolete.
Assignee | ||
Comment 6•2 years ago
|
||
The previous changes to the Spotlight schema made one of the logo.imageURL or
logo.imageId required. However, this is not backwards compatible with the older
Firefoxen, so we have to support the case where logo
is present (e.g., for
image.size
) without either of those properties, but logoImageURL
is
present.
Depends on D138928
Updated•2 years ago
|
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/143d1392493e Expose feature schemas as resource:// URIs r=andreio https://hg.mozilla.org/integration/autoland/rev/d191bf245e98 Rewrite PanelTestProvider test as xpcshell test with new json schema validator r=andreio https://hg.mozilla.org/integration/autoland/rev/e759d7cfc1a7 Validate experiment features where we have schemas r=andreio https://hg.mozilla.org/integration/autoland/rev/4e95d6562f3a Make the Spotlight schema less strict with respect to images r=emcminn
Comment 8•2 years ago
|
||
Backed out for causing failures at browser_asrouter_experimentsAPILoader.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/bb5743644b4703261cb693862cb28c92d52170d5
Failure log: https://treeherder.mozilla.org/logviewer?job_id=371596905&repo=autoland&lineNumber=4606
Assignee | ||
Updated•2 years ago
|
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/431554e2ddd2 Expose feature schemas as resource:// URIs r=andreio https://hg.mozilla.org/integration/autoland/rev/d5abc8bb62fd Rewrite PanelTestProvider test as xpcshell test with new json schema validator r=andreio https://hg.mozilla.org/integration/autoland/rev/4fc6a73e72dd Validate experiment features where we have schemas r=andreio https://hg.mozilla.org/integration/autoland/rev/37895d08ff95 Make the Spotlight schema less strict with respect to images r=emcminn
Comment 10•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/431554e2ddd2
https://hg.mozilla.org/mozilla-central/rev/d5abc8bb62fd
https://hg.mozilla.org/mozilla-central/rev/4fc6a73e72dd
https://hg.mozilla.org/mozilla-central/rev/37895d08ff95
Updated•2 years ago
|
Description
•