Closed
Bug 1442559
Opened 6 years ago
Closed 6 years ago
browser_parsable_css.js will permafail for opt builds of beta 60
Categories
(Firefox :: Theme, defect)
Firefox
Theme
Tracking
()
VERIFIED
FIXED
Firefox 60
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox58 | --- | unaffected |
firefox59 | --- | unaffected |
firefox60 | --- | verified |
People
(Reporter: aryx, Assigned: xidorn)
References
Details
Attachments
(3 files, 1 obsolete file)
central-as-beta simulation: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d41944694361da6a2742694bf2c6cd0ca79d1b4e&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable&selectedJob=165416922 Log: https://treeherder.mozilla.org/logviewer.html#?job_id=165416922&repo=try Unused whitelist item. sourceName: /(?:res|gre-resources)\/(ua|html)\.css$/i errorMessage: /Unknown pseudo-class .*\bfullscreen\b/i
Flags: needinfo?(jaws)
Comment 1•6 years ago
|
||
Xidorn, you fixed this in bug 1333175. Any reason why this is failing again?
Flags: needinfo?(jaws) → needinfo?(xidorn+moz)
Comment 2•6 years ago
|
||
Oh, are we shipping this now in 60 so we can remove it from the whitelist? I'm not sure why this isn't failing on Nightly builds though.
Reporter | ||
Comment 3•6 years ago
|
||
This new central-as-beta simulation has the check below the list removed and passes: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4d8d55b5b0c758813921149b9594519e1b3a1e22&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable So is this code still of use? https://dxr.mozilla.org/mozilla-central/rev/df0e967f8e8fa30a69338008b6ee296bf5e9c545/browser/base/content/test/static/browser_parsable_css.js#140-146 The pref associated with it - full-screen-api.unprefix.enabled - is false on release and beta but true on nightly: https://dxr.mozilla.org/mozilla-central/rev/df0e967f8e8fa30a69338008b6ee296bf5e9c545/modules/libpref/init/all.js#5160-5164
Reporter | ||
Updated•6 years ago
|
tracking-firefox60:
--- → ?
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•6 years ago
|
||
We are not shipping unprefixed fullscreen in 60, so I don't expect it to become useless. There must be some other reason...
Assignee | ||
Comment 6•6 years ago
|
||
So the reason here is that the propName items added in bug 1441882 whitelists all warnings, and thus any whitelist item appended after them would be reported unused. Sounds like bug 1441882 is basically making the whole whitelist meaningless. You can remove everything before the first {propName} item and the test would still pass.
Flags: needinfo?(xidorn+moz)
Assignee | ||
Comment 7•6 years ago
|
||
The reason is that function ignoredError would always return true if there is a whitelist item contains neither sourceName nor errorMessage.
Assignee | ||
Comment 8•6 years ago
|
||
To avoid this kind of issue happens again, we probably should really add a catch all whitelist item and ensure that it never touched.
Comment 9•6 years ago
|
||
mozreview-review |
Comment on attachment 8955699 [details] Bug 1442559 - Remove unused CSS whitelist entry for fullscreen. https://reviewboard.mozilla.org/r/224784/#review230814 r- per bug comments that this isn't the right fix.
Attachment #8955699 -
Flags: review?(gijskruitbosch+bugs) → review-
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Updated•6 years ago
|
Attachment #8955699 -
Attachment is obsolete: true
Comment 14•6 years ago
|
||
mozreview-review |
Comment on attachment 8955728 [details] Bug 1442559 part 1 - Make it clearer what whitelist item filters the error. https://reviewboard.mozilla.org/r/224804/#review230840 ::: browser/base/content/test/static/browser_parsable_css.js:164 (Diff revision 1) > +function dumpWhitelistItem(item) { > + let props = []; > + for (let prop in item) { > + props.push(`${prop}: ${item[prop]}`); > + } > + return `{${props.join(", ")}}`; > +} Nit: ```js return JSON.stringify(item, (key, value) => { return (value instanceof RegExp) ? value.toString() : value; }); ``` ::: browser/base/content/test/static/browser_parsable_css.js:192 (Diff revision 1) > } > } > if (matches) { > whitelistItem.used = true; > + let {sourceName, errorMessage} = aErrorObject; > + info(`Ignored error "${errorMessage}" on ${sourceName}. ` + Nit: add `because of whitelist item` to the string before dumping the whitelist item, please.
Attachment #8955728 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 15•6 years ago
|
||
mozreview-review |
Comment on attachment 8955729 [details] Bug 1442559 part 2 - Use a separate whitelist for prop names. https://reviewboard.mozilla.org/r/224806/#review230842 ::: browser/base/content/test/static/browser_parsable_css.js:488 (Diff revision 1) > " file: " + item.file + > " from: " + item.from); Looks like this could also use `dumpWhitelistItem`? ::: browser/base/content/test/static/browser_parsable_css.js:499 (Diff revision 1) > + for (let item of propNameWhitelist) { > + if (!item.used && > + (!item.platforms || item.platforms.includes(AppConstants.platform)) && > + isDevtools == item.isFromDevTools && > + !item.intermittent) { > + ok(false, `Unused whitelist item. propName: ${item.propName}`); Ditto. More generally, can you factor these 3 loops out into a function that just takes the whitelist in question as an argument, with perhaps an argument to use in the error message string to clarify which whitelist this came from - though if we use `dumpWhitelistItem` everywhere I don't think it'll be much of an issue figuring out what it is anyway.
Attachment #8955729 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 16•6 years ago
|
||
mozreview-review |
Comment on attachment 8955730 [details] Bug 1442559 part 3 - Detect whitelist item which doesn't have any condition. https://reviewboard.mozilla.org/r/224808/#review230844
Attachment #8955730 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 20•6 years ago
|
||
Pushed by xquan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2bf42743feb part 1 - Make it clearer what whitelist item filters the error. r=Gijs https://hg.mozilla.org/integration/autoland/rev/6371120b7c1c part 2 - Use a separate whitelist for prop names. r=Gijs https://hg.mozilla.org/integration/autoland/rev/d540c55c96c5 part 3 - Detect whitelist item which doesn't have any condition. r=Gijs
Comment 21•6 years ago
|
||
Backed out for eslint failure at /builds/worker/checkouts/gecko/browser/base/content/test/static/browser_parsable_css.js:474 Push that caused the failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=d540c55c96c5e4fdab1434032628fa876152b8e1 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=165884240&repo=autoland&lineNumber=240 Backout: https://hg.mozilla.org/integration/autoland/rev/53f082b32ba9eb0b9febdc97373c89b9ac500bd3
Flags: needinfo?(xidorn+moz)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 25•6 years ago
|
||
Pushed by xquan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4d6a3eb93a00 part 1 - Make it clearer what whitelist item filters the error. r=Gijs https://hg.mozilla.org/integration/autoland/rev/756d5b77b540 part 2 - Use a separate whitelist for prop names. r=Gijs https://hg.mozilla.org/integration/autoland/rev/39e3ac3b1194 part 3 - Detect whitelist item which doesn't have any condition. r=Gijs
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(xidorn+moz)
Comment hidden (Intermittent Failures Robot) |
Comment 27•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4d6a3eb93a00 https://hg.mozilla.org/mozilla-central/rev/756d5b77b540 https://hg.mozilla.org/mozilla-central/rev/39e3ac3b1194
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Comment 28•6 years ago
|
||
mozreview-review |
Comment on attachment 8955729 [details] Bug 1442559 part 2 - Use a separate whitelist for prop names. https://reviewboard.mozilla.org/r/224806/#review230918 Code analysis found 1 defect in this patch: - 1 defect found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: browser/base/content/test/static/browser_parsable_css.js:472 (Diff revision 2) > // as the ok(false) in messageIsCSSError. > let errors = messages.filter(messageIsCSSError); > is(errors.length, 0, "All the styles (" + allPromises.length + ") loaded without errors."); > > // Confirm that all whitelist rules have been used. > + function checkWhitelist(whitelist) { Error: 'whitelist' is already declared in the upper scope. [eslint: no-shadow]
Comment 29•6 years ago
|
||
mozreview-review |
Comment on attachment 8955730 [details] Bug 1442559 part 3 - Detect whitelist item which doesn't have any condition. https://reviewboard.mozilla.org/r/224808/#review230920 Code analysis found 1 defect in this patch: - 1 defect found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: browser/base/content/test/static/browser_parsable_css.js:480 (Diff revision 2) > // as the ok(false) in messageIsCSSError. > let errors = messages.filter(messageIsCSSError); > is(errors.length, 0, "All the styles (" + allPromises.length + ") loaded without errors."); > > // Confirm that all whitelist rules have been used. > function checkWhitelist(whitelist) { Error: 'whitelist' is already declared in the upper scope. [eslint: no-shadow]
Reporter | ||
Comment 30•6 years ago
|
||
Verified fixed with the latest central-as-beta simulation: https://treeherder.mozilla.org/#/jobs?repo=try&revision=dc0e79a9e1e17888ac8cebe43ae3bdaf1c7b4a57&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
You need to log in
before you can comment on or make changes to this bug.
Description
•