Repository navigation
ci: run the real fzf-tab preview case on macOS - #7
Merged
Merged
Conversation
The macOS job clones fzf-tab from its config/bootstrap/git-clones.tsv row, as the bootstrap does, and sets FZF_TAB_TEST_DIR, so the real fzf-tab preview case of test_ai_integration runs there instead of skipping; the ubuntu-24.04 runner has no zsh. The case now keeps the caller's PATH behind the launchers, as every other case does: /usr/bin has no Python 3.11 on a macOS runner.
On macOS CI the real fzf-tab case hung until the job's 20-minute timeout, with a Python process of the session left over; Linux never hangs here. The test killed zsh and waited for it before closing the terminal, so a last close that waits for unread output to drain, as on macOS and the BSDs, would wait on a reader that never comes. It now kills the session's process group, closes the terminal, then waits. An alarm (not a watchdog thread, since forking a multi-threaded process can deadlock the child) turns any remaining hang into a TimeoutError with its traceback, and a failure shows what the terminal printed.
# Conflicts: # tests/COVERAGE.md
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.
What
#5's real fzf-tab preview case (
test_real_fzf_tab_previews_accounts_through_the_kit) skipped in every CI job, because no job had an fzf-tab checkout. Theubuntu-24.04runner has no zsh, so the hermetic preview case skips there too; macOS runs it.config/bootstrap/git-clones.tsvrow (URL and default branch, as the bootstrap clones it) into the runner's temp directory and exportsFZF_TAB_TEST_DIR./usr/bin:/bin, and a macOS runner's/usr/bin/python3is older than the 3.11 the kit launchers need.A macOS hang, fixed in commit 2
The first CI run of this PR timed out after 20 minutes on macOS inside the real case, and a Python process of its session was left over. Linux never hangs there.
The test used to kill zsh and wait for it before closing the pty master. On macOS and the BSDs, the last close of a terminal with unread output can wait for that output to drain, and nothing was left to read it. That is the likely cause; I could not confirm it without a Mac.
test: end the real fzf-tab case's terminal session without blocking:SIGALRMbound turns any remaining hang into aTimeoutErrorwith its traceback. It is an alarm, not a watchdog thread, because forking a multi-threaded process can deadlock the child;The second run is green on all three OSes, and the macOS job reports
test_real_fzf_tab_previews_accounts_through_the_kit ... ok.Verified
/bin/bash -eo pipefailcloned fzf-tab master (24105b1) and wrote the variable.cbdc582.tests/run.sh --ci, the pwsh suites (except the lab's known long-TMPDIR case) andpre-commit run --all-filespass.Tradeoff
CI follows fzf-tab's default branch, as every host does, rather than a pinned commit. An upstream change that breaks the preview would turn macOS CI red, and it would be breaking hosts at the same time.