-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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 the browser-tests in Google Chrome on the bots #19117
Conversation
Given that `browsertest` repeatedly timeout in Google Chrome, and considering that Firefox is the primary development target, we stop running them on the bots to avoid having to repeatedly deal with this. Note that we already disabled these tests *on Windows* almost three years ago, because of stability issues; see PR 14392.
bd93dd1
to
fd31e72
Compare
While Firefox is the primary development target, PDF.js is a cross-browser library so it would be nice to have broader test coverage.
I'd like to understand why the tests time out and see if we/I can fix that instead of disabling test coverage altogether. Do you have a list of recent failures that I can investigate? Is there a way to reproduce the issue locally? |
Sure, however the current situation is impacting general development negatively and @calixteman and myself agree that running
I think that should be done separately after we land this, since for one thing this appears to be blocking updating of Puppeteer which is necessary for the addition of new integration-tests (there's work happening on e.g. the Ink-editor that needs that).
Not really a list, but please see one recent example in #19115 (comment).
Sorry, don't know since I'm not testing in Chrome locally. |
Is the Puppeteer PR at #19115 the primary motivation for this change, or are there more instances? The failures in the Puppeteer PR look like reftest failures, not very surprising when browser versions are bumped. I don't see test timeouts in the reftests. If it is just that single test failing in a specific browser with no time to investigate/fix, then I'd prefer skipping that single test instead of disabling everything altogether. I don't spend as much time on PDF.js development as you all, so I won't push back too hard if the tests are more harmful than helpful for your experience. However I do want to make sure that this is indeed a fundamental issue that needs addressing, instead of an incidental case. In the event that you want to disable it, I'd like to not disable the ability to run browser tests altogether, but to disable it by default with a way to opt in. So that "botio test" defaults to what you'd like and that "botio-chrome" or something can be used to debug the issue, with the goal of getting the tests back to a reliable state. Diversity in test environments slows down development when there are inexplicable intermittent test failures, but can also be valuable in serving as an independent verification that the logic is as desired. Disabling all tests in Chrome increases the risk of ending up with a library that is unreliable in all but one browser. |
The
Also, the
We've already tried doing that once, and having to keep disabling tests "randomly" in Chrome really isn't a feasible solution.
They can still be run just fine locally, since these changes only affect the bots. |
Can you describe in more detail the kind of failures? Reftests, integration tests, or both? I'd like to investigate and improve the situation, but haven't followed the bot tests test closely to tell what common pain points are.
@calixteman ran the tests again and the test times out again. Looks pretty consistent. Was this 100% failure rate (n=2) already that consistent before? The failures being consistent would make it easier to debug & fix.
My local machine differs from the bot environment. Tests passing on my local machine doesn't mean as much as tests passing on the bots. With my intent to improve the reliability of tests on the bots, I need a way to run tests on exactly the same environment. |
We recently had to disable one test in PR #19024, however having to do that repeatably is an untenable situation that waste both human and machine time. |
The last ran test with Chrome is |
I think I agree with Calixte here. It would certainly be better to keep running Chrome too, but on the other hand the number of issues did increase lately (another example is #19032) and I also don't really recall having seen reference test failures in Chrome that weren't also visible in Firefox, so in that sense I doubt we'll lose much if any test coverage if we disable Chrome for the reference tests only. I do indeed think that we should keep running Chrome for the integration tests because that has already been of value multiple times. How about we do the following?
The advantage of this approach is that we can both investigate the situation with Chrome while in the meantime making sure that the failures are not in the way for new PRs. Would that be feasible? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving this PR because @Snuffleupagus , @calixteman, @timvandermeij and I have consensus on the proposed direction. To summarize:
Browser tests (essentially reference tests, reftests) are currently run in Firefox and Chrome. Their purpose is to detect regressions in PDF.js logic. When a regression occurs, relevant tests usually fail in both browsers.
The maintenance cost of these tests is non-trivial: these tests occasionally fail or time out for reasons unrelated to PDF.js itself (e.g. browser updates, e.g. through puppeteer updates as seen in #19115), and require attention from PDF.js developers to investigate and resolve/ignore. Since Firefox is the primary development target, and tests are currently failing frequently in Chrome, this patch stops running them in CI. This only affects reference tests, as we continue to run some other unit tests and integration tests in both browsers.
Once this PR is merged, the following behaviors change in CI:
- "botio browsertest" (
gulp botbrowsertest
) no longer runs reference tests in Chrome (only Firefox). - "botio test" (
gulp bottest
) no longer runs reference tests in Chrome (only Firefox). It continues to run unit tests and integration tests in Chrome. - "botio makeref" (
gulp botmakeref
) stops creating new reference images in Chrome. Locally,gulp makeref
can still be used to create reference images as before (including Chrome).
Next steps after merging: file issue to track the following work:
- reintroduce an independent way to run the reference tests in Chrome too (or only).
- investigate the cause of the failures and improve their stability
- monitor test stability
- re-enable ref tests in Chrome by default.
Given that
browsertest
repeatedly timeout in Google Chrome, and considering that Firefox is the primary development target, we stop running them on the bots to avoid having to repeatedly deal with this.Note that we already disabled these tests on Windows almost three years ago, because of stability issues; see PR #14392.