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
CI: Fix(?) for macos test runner hang #1132
Conversation
This seems to prevent test hangs that have been happening on the "macos-latest py3.11" runner.
6d6be53
to
25164ea
Compare
Well, this might not fix whatever the underlying cause of the hangs is, but I'm going to merge it now anyway. |
Not so surprisingly, that was not it. I've seen the hang happen once now with this pin in place. Furthermore, now, even removing the pin, and running the tests for exactly the same commit as failed (consistently) a few days ago, it does not hang. |
This seems possibly no longer necessary to prevent the macOS CI run from hanging. (See lektor#1132.) This reverts commit 7960115.
* feat(imagetools): use Pillow (instead of imagemagick) for thumbnailing * feat(imagetools): clean up remnants of imagemagick config * test(imagetools): add color-space handling test page to test demo project * fix: get_image_info(): return format=None for short file Previous `format=`"unknown"` was being returned for short files, while `None` was being returned for all other unrecognized image files. * refactor(imagetools): omit sRGB color profile from thumbnails After some experimentation, it turns out that the old imagemagick code just discarded any embedded color profile from the source image. After this commit, we attempt to transform the source image from any embedded color profile to sRGB, but still omit the sRGB color profile from the resulting thumbnail. * refactor(imagetools): make Pillow a required dependency * fix(imagetools): _combine_make - return model (not make) If the model contains the make, we want the model as the combined value. * test: Test with older versions of Pillow - 6.0.x and 7.0.x * feat!: convert warning to error when thumbnail dim missing Since Lektor==3.2.dev0 make_image_thumbnail has been issuing a warning and falling back to FIT mode when called without both a thumbnail width and height when the mode other than FIT. Now we raise ValueError in that case. * Revert "ci: pin coverage<7.0.2 on macOS (#1132)" This seems possibly no longer necessary to prevent the macOS CI run from hanging. (See #1132.) This reverts commit 7960115.
It's possible that disusing |
This seems to prevent test hangs that have been happening on the "macos-latest py3.11" runner.
) * feat(imagetools): use Pillow (instead of imagemagick) for thumbnailing * feat(imagetools): clean up remnants of imagemagick config * test(imagetools): add color-space handling test page to test demo project * fix: get_image_info(): return format=None for short file Previous `format=`"unknown"` was being returned for short files, while `None` was being returned for all other unrecognized image files. * refactor(imagetools): omit sRGB color profile from thumbnails After some experimentation, it turns out that the old imagemagick code just discarded any embedded color profile from the source image. After this commit, we attempt to transform the source image from any embedded color profile to sRGB, but still omit the sRGB color profile from the resulting thumbnail. * refactor(imagetools): make Pillow a required dependency * fix(imagetools): _combine_make - return model (not make) If the model contains the make, we want the model as the combined value. * test: Test with older versions of Pillow - 6.0.x and 7.0.x * feat!: convert warning to error when thumbnail dim missing Since Lektor==3.2.dev0 make_image_thumbnail has been issuing a warning and falling back to FIT mode when called without both a thumbnail width and height when the mode other than FIT. Now we raise ValueError in that case. * Revert "ci: pin coverage<7.0.2 on macOS (lektor#1132)" This seems possibly no longer necessary to prevent the macOS CI run from hanging. (See lektor#1132.) This reverts commit 7960115.
Our CI tests have been hanging recently.
The
macos-latest py3.11
job sometimes hangs during running of thetox
tests. When this happens, it gets stuck and just spins until the job is cancelled or times out (after three hours.)This seems to have started somewhere around f8a4b3f.
It seems to be getting stuck in the tests in
test_watcher.py
(or possibly intest_videotools.py
— the last output in the logs when it get stuck is from test_videotools; test_watcher is the next test file).I've been flailing on this for a few days now, changing parameters and seeing what triggers the hang.
Currently, all of the following seem to be required for the problem to occur:
Furthermore, diagnosing the issue is hindered by the facts:
-v
(verbose) flag, it doesn't hang.-s
(don't capture stdout/err) flag, it doesn't hang.It also seems heuristically true that:
ffmpeg
is not installed, it doesn't hang.test_videotools.py
are skipped, it doesn't hang.test_images.py
are skipped, it doesn't hang.tests/test_watcher.py::TestBasicWatcher::test_creates_observer
is disabled, it doesn't hang. (The other tests intest_watcher.py
can be skipped, as long atest_creates_observer
is still enabled, it hangs.)watchdog
's fsevents-based native observer are skipped (testing only withPollingObserver
) it doesn't hang.coverage
(to collect coverage data) is omitted, it doesn't hang.If[Edit: okay, that's not true. It still hangs sometimes withcoverage
is pinned to<7.0.2
, it doesn't hang.coverage<7.0.2
.]At this point, I have a vague hunch that the issue has something to do with watchdog's fsevents observer. (This is the only bit of watchdog that uses an extension written in C, and it is only used on macOS.)
But really, I have no idea.
Anyhow, as things stand, pinning
coverage
on macOS seems to "fix" the issue, at least for now.So that's what this PR does.