LocalNTPTest.NonGoogleNTPLoadsWithoutError is flaky |
||||||
Issue descriptionDashboard: https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=LocalNTPTest.NonGoogleNTPLoadsWithoutError It's not *very* flaky, but still too much. Seems to be mostly on Linux CFI and occasionally on Win7. I see two error cases: 1) ../../chrome/browser/ui/search/local_ntp_browsertest.cc:455: Failure Value of: is_google Actual: true Expected: false (and then a bunch of histogram expectations fail, likely as a consequence of that) 2) [1492:6768:1204/123459.701:ERROR:CONSOLE(0)] "Failed to find a valid digest in the 'integrity' attribute for resource 'chrome-search://local-ntp/config.js' with computed SHA-256 integrity '4xD3MlIY0P4FoUe54PC59x7yIMKf8d0awxMdDjjzxkA='. The resource has been blocked.", source: chrome-search://local-ntp/local-ntp.html (0) [1492:6768:1204/123459.715:ERROR:CONSOLE(571)] "Uncaught ReferenceError: configData is not defined", source: chrome-search://local-ntp/local-ntp.js (571) (and then the test times out, probably because it's waiting for some "finished loading" notification that never arrives)
,
Dec 5 2017
On further reflection, b) won't actually fix the race condition. Possible sequence of events after b) is implemented (all on the IO thread): - is_google starts out true. - local_ntp.html is served, containing checksum for config.js based on is_google==true. - is_google gets set to false. - config.js is served based on is_google==false. - Checksum doesn't match. - Boom. I still think it's the right thing to do, it just won't fix this particular problem.
,
Dec 6 2017
Since neither a) nor b) will actually fix this, adding more ideas:
c) Introduce versioning for config.js: While serving local_ntp.html and inserting the checksum, also add a version suffix to the path of config.js ("config-1.js"), and cache the generated config along with the version number. Then when the config file is requested, we know which one to serve.
Problem: The checksum *also* goes into the CSP, and URLDataSource doesn't provide a way to tie CSP requests (GetContentSecurityPolicyScriptSrc) to actual file requests. I don't know how to solve this.
d) Load config.js dynamically (i.e. create a script tag from local_ntp.js). Then thanks to 'strict-dynamic', no checksum for config.js will be required (neither in the html nor in the CPS). Profit!
Potential downsides: It'll make the overall loading process a bit more complicated. This might have a perf impact, though it should be small. It might also make the setup for tests a bit more tricky, though I think that should work out.
,
Dec 6 2017
,
Dec 6 2017
,
Dec 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/773623d293ed991e20596c4cb00e58610af5f395 commit 773623d293ed991e20596c4cb00e58610af5f395 Author: Marc Treib <treib@chromium.org> Date: Thu Dec 07 15:17:16 2017 Local NTP: Load config.js dynamically With this, no checksum is required for config.js anymore, which fixes a race condition between serving the checksum and serving the contents themselves. It also lets us remove quite a lot of plumbing :) Bug: 792490 , 791969 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I609ef274325bddb49bcbe6e90d58d35b7a385920 Reviewed-on: https://chromium-review.googlesource.com/811185 Commit-Queue: Marc Treib <treib@chromium.org> Reviewed-by: Chris Pickel <sfiera@chromium.org> Cr-Commit-Position: refs/heads/master@{#522428} [modify] https://crrev.com/773623d293ed991e20596c4cb00e58610af5f395/chrome/browser/resources/local_ntp/local_ntp.css [modify] https://crrev.com/773623d293ed991e20596c4cb00e58610af5f395/chrome/browser/resources/local_ntp/local_ntp.html [modify] https://crrev.com/773623d293ed991e20596c4cb00e58610af5f395/chrome/browser/resources/local_ntp/local_ntp.js [modify] https://crrev.com/773623d293ed991e20596c4cb00e58610af5f395/chrome/browser/search/local_ntp_source.cc [modify] https://crrev.com/773623d293ed991e20596c4cb00e58610af5f395/chrome/browser/search/local_ntp_source.h [modify] https://crrev.com/773623d293ed991e20596c4cb00e58610af5f395/chrome/test/data/local_ntp/local_ntp_browsertest.html
,
Dec 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/71d761879bc76e7902d315c55ec0b9492dab0058 commit 71d761879bc76e7902d315c55ec0b9492dab0058 Author: Marc Treib <treib@chromium.org> Date: Fri Dec 08 08:48:41 2017 Local NTP tests: Wait for TemplateURLService to load before using it This might have been a cause of flakiness in these tests. Bug: 791969 Change-Id: I58d66ef67cd708c18fb902310c63aec29ea057b9 Reviewed-on: https://chromium-review.googlesource.com/814516 Reviewed-by: Chris Pickel <sfiera@chromium.org> Commit-Queue: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#522739} [modify] https://crrev.com/71d761879bc76e7902d315c55ec0b9492dab0058/chrome/browser/ui/search/local_ntp_test_utils.cc
,
Dec 8 2017
,
Dec 11 2017
This seems to have done it, no more flakes in the past 3 days.
,
Dec 11 2017
The NextAction date has arrived: 2017-12-11 |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by treib@chromium.org
, Dec 5 2017