Repository navigation
[ASIM-6255] Revive the build: share one headless Chrome across the test session - #300
Merged
Merged
Conversation
nicoddemus
force-pushed
the
fb-ASIM-6255-qmxgraph-build
branch
from
October 8, 2026 18:25
17ff600 to
79a8d4a
Compare
nicoddemus
commented
Oct 8, 2026
nicoddemus
force-pushed
the
fb-ASIM-6255-qmxgraph-build
branch
from
October 8, 2026 19:37
79a8d4a to
d0fc075
Compare
nicoddemus
marked this pull request as ready for review
October 8, 2026 19:37
nicoddemus
added this pull request to stack #302
October 8, 2026 19:56
BeneBr
approved these changes
Oct 9, 2026
The CI build has been timing out for months: about halfway through the suite Chrome stops answering chromedriver, and every following test hangs on browser startup, gets rerun and errors out. The same hang reproduces locally on Windows, and the test that triggers it passes in isolation. Drop pytest-selenium, which launched a new Chrome and chromedriver for every test, in favor of a single session-wide browser, and stop forcing a 1-second page load timeout with refresh retries. Locally the suite went from a hang (or ~12 minutes with a dozen reruns) to about a minute with no reruns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…here test_set_scale_and_translation crashed on Selenium 4, which dropped the legacy non-W3C actions, and was marked xfail on Linux because its expected translation differed from Windows. Port its right-button drag to W3C actions, starting from the container's center since zooming pushes the vertex off-screen, where Selenium 4 refuses to move the pointer. The platform difference came from the headless viewport: the same window size yields a different viewport width on each platform, and zooming centers on the container, shifting x. Fix the viewport through the DevTools protocol, re-baseline the expected translation and drop the xfail. The scale is deterministic, so also compare it precisely instead of with a tolerance that accepted almost any value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under QtWebEngine 5.15.15 JS errors reach Python as a bare "Script error.", without message, location or stack, to be handled in ASIM-6921. The xfail is strict, so the test fails once that is fixed and the marker gets removed along with the fix instead of being left behind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conda-devenv based install broke on the GitHub runners: the base conda there no longer recognizes the `devenv` subcommand, so the build failed before running any test. Give the project its own pixi environment, generated by pixi-devenv from conda-forge, with the test dependencies in a `test` feature so they don't leak into downstream environments. Tests now run on Python 3.12 instead of 3.10. The mxgraph package is dropped from the dependencies, as it only exists on a private channel and the tests clone mxgraph from GitHub anyway; downstream environments that need it must now declare it themselves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With CI on pixi, the conda-devenv environment files were left unused and the docs still taught a setup that no longer works. Drop the conda-devenv files and rewrite the installation and examples instructions around `pixi run`. The `docs` task now builds in a dedicated pixi environment, whose dependencies are also listed in the requirements file Read the Docs installs, so both note the coupling. Building under `-W` needed a couple of docs warnings fixed; the two API handler registrations involved are annotated along the way, and no longer return the always-empty JS result. Declare typing_extensions as a main dependency along the way: oop-ext imports it but its conda-forge package doesn't declare it, so environments only got it by accident through unrelated dependencies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests using the graph cases were automatically rerun up to three times on CI to cope with the browser flakiness of launching one Chrome per test. With a single shared browser that flakiness is gone, and a rerun can no longer recover a broken browser anyway, so reruns would only hide real intermittent failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Python 3.14, the tests that host their own graph page fail on Linux with "No child processes": the default multiprocessing start method there became forkserver, so the server process is no longer a direct child and waiting on its pid fails. Fix it ahead of testing on 3.14. Stop the server through the multiprocessing process object instead, which works with any start method and on Windows alike, and annotate the class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qmxgraph declared Python 3.10 as its minimum, but only 3.12 was tested, and the docs environment resolved a different Python than the tests. Raise the minimum to 3.12 and run CI on 3.12, 3.13 and 3.14, each a pixi environment combining the test feature with a feature that only pins the Python version. The docs environment shares the 3.12 solve group with the default one, so both resolve the same package versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Building the resources and running the tests both need MXGRAPHPATH, which developers and CI had to export by hand, in a bash-only way. With mxgraph no longer a dependency, the fallback to the environment's mxgraph package can't work in qmxgraph's own environments either. Point it at the mxgraph clone in the repository from the test feature, so it applies to every test environment on any platform without leaking into downstream projects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicoddemus
force-pushed
the
fb-ASIM-6255-qmxgraph-build
branch
from
October 9, 2026 16:27
5d7a8b2 to
d2f0b3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Revives the CI build (ASIM-6255), which had been timing out and was disabled for months.
The problem: about halfway through the suite Chrome stopped answering chromedriver, and every following test hung on browser startup, got rerun and errored out.
The cause:
pytest-seleniumlaunched a new Chrome + chromedriver for every test, and the page fixture forced a 1-second page load timeout with refresh retries. Now a single headless Chrome is shared by the whole session (each test still loads its own page).Other changes:
pixi-devenv(including docs).test_error_redirectionmarked xfail: under QtWebEngine 5.15.15 JS errors reach Python as a bare"Script error."(ASIM-6921).🤖 Generated with Claude Code