Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable new tab page stuff in Firefox when running tests #18356

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

calixteman
Copy link
Contributor

It should help to have such a garbage in the logs:

console.warn: TopSitesFeed: Failed to fetch data from Contile server: NetworkError when attempting to fetch resource.
JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource.

It should help to have such a garbage in the logs:
```
console.warn: TopSitesFeed: Failed to fetch data from Contile server: NetworkError when attempting to fetch resource.
JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource.
```
@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/5a93fb86c60dd0b/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/83152bf1cf8cd9f/output.txt

@timvandermeij
Copy link
Contributor

Out of curiosity, where have you seen those logs? I don't have them locally (the new tab page is empty if I manually open one in the headful test browser) and I also don't recall having seen them on the bots.

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/5a93fb86c60dd0b/output.txt

Total script time: 7.92 mins

  • Integration Tests: Passed

@calixteman
Copy link
Contributor Author

I'm running the tests on Windows but from an Ubuntu within WSL2.
When I make a full run of the integration tests I can see the above line several times.
Chrome/Firefox are not super fast when ran from Linux through WSL so maybe the induced overhead makes the new tab living enough to start to trigger some network requests.

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/83152bf1cf8cd9f/output.txt

Total script time: 19.10 mins

  • Integration Tests: Passed

@calixteman
Copy link
Contributor Author

That said in general it's probably not that bad to remove the small overhead due to the new tab page stuff.

@timvandermeij timvandermeij merged commit 067ec20 into mozilla:master Jul 1, 2024
9 checks passed
@timvandermeij
Copy link
Contributor

Looks like a good idea to me; thanks!

timvandermeij added a commit to timvandermeij/pdf.js that referenced this pull request Jul 13, 2024
In PR mozilla#18356 the new tab page logic was disabled to prevent Firefox
from logging failed network connections to Contile, the Mozilla Tiles
service that is used for the new tab page [1]. However, recently this
log reappeared locally and on the bots:

```
console.warn: TopSitesFeed: Failed to fetch data from Contile server:
NetworkError when attempting to fetch resource.
```

It looks like Contile communication is also triggered from other places
in Firefox such as the URL bar [2], so this commit fixes the issue by
disabling network connections to Contile [3] altogether regardless of
their origin within Firefox. Note that we don't revert the change from
PR mozilla#18356 because as noted in [4] it can't hurt to keep that disabled
too to avoid overhead for a feature we don't use in the tests.

[1] https://github.com/mozilla-services/contile
[2] https://searchfox.org/mozilla-central/source/browser/components/urlbar/UrlbarProviderTopSites.sys.mjs#38
[3] https://github.com/mozilla/gecko-dev/blob/196ef8360e4d3b5c334f1f8f91b3b1fdb434eb63/browser/components/newtab/lib/TopSitesFeed.sys.mjs#L111
[4] mozilla#18356 (comment)
timvandermeij added a commit to timvandermeij/pdf.js that referenced this pull request Jul 13, 2024
In PR mozilla#18356 the new tab page logic was disabled to prevent Firefox
from logging failed network connections to Contile, the Mozilla Tiles
service that is used for the new tab page [1]. However, recently this
log reappeared locally and on the bots:

```
console.warn: TopSitesFeed: Failed to fetch data from Contile server:
NetworkError when attempting to fetch resource.
```

It looks like Contile communication is also triggered from other places
in Firefox such as the URL bar [2], so this commit fixes the issue by
disabling network connections to Contile [3] altogether regardless of
their origin within Firefox. Note that we don't revert the change from
PR mozilla#18356 because as noted in [4] it can't hurt to keep that disabled
too to avoid overhead for a feature we don't use in the tests.

[1] https://github.com/mozilla-services/contile
[2] https://github.com/mozilla/gecko-dev/blob/196ef8360e4d3b5c334f1f8f91b3b1fdb434eb63/browser/components/urlbar/UrlbarProviderTopSites.sys.mjs#L38
[3] https://github.com/mozilla/gecko-dev/blob/196ef8360e4d3b5c334f1f8f91b3b1fdb434eb63/browser/components/newtab/lib/TopSitesFeed.sys.mjs#L111
[4] mozilla#18356 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants