test: deflake python venv go backend e2e#10156
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the cleanup process in the test_python_venv_with_go_backend_deadlock_slow end-to-end test by introducing a cleanup_go_cache function registered as an EXIT trap and parameterizing the installation timeout. The review feedback suggests making the cleanup function more robust by using '$HOME/go' instead of ~/go and appending '|| true' to the chmod command to prevent potential test failures under set -e.
| cleanup_go_cache() { | ||
| # Required to properly cleanup as go installs read-only sources | ||
| if [ -d ~/go ]; then | ||
| chmod -R +w ~/go | ||
| fi | ||
| } |
There was a problem hiding this comment.
Since set -euo pipefail is enabled, any failure in the chmod command (for example, if files are concurrently modified or if there are permission restrictions) will cause the cleanup function to exit with an error. In an EXIT trap, this can result in the entire script exiting with a non-zero status, causing false-positive test failures in CI.
Additionally, using "$HOME/go" is more robust and standard in shell scripts than the unquoted tilde ~/go.
Consider appending || true to the chmod command and using "$HOME/go".
cleanup_go_cache() {
# Required to properly cleanup as go installs read-only sources
if [ -d "$HOME/go" ]; then
chmod -R +w "$HOME/go" || true
fi
}
Greptile SummaryThis PR deflakes the Python venv + Go backend deadlock e2e test by giving cold Go module downloads more room to finish and ensuring the go-cache write-permission cleanup runs even when the test is cut short by a timeout.
Confidence Score: 5/5This is a small, targeted e2e test fix with no production code changes; the two modifications are straightforward and correct. The EXIT trap correctly fires when set -e terminates the shell after timeout kills mise install, so the go-cache cleanup now runs in all exit paths. The timeout variable is safely quoted and defaults to a reasonable value. No logic from the original test is altered. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "test: deflake python venv go backend e2e" | Re-trigger Greptile |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.16 x -- echo |
22.5 ± 0.4 | 21.7 | 24.2 | 1.00 ± 0.03 |
mise x -- echo |
22.4 ± 0.4 | 21.6 | 25.1 | 1.00 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.16 env |
22.1 ± 0.9 | 21.2 | 29.3 | 1.01 ± 0.04 |
mise env |
21.9 ± 0.4 | 21.1 | 26.0 | 1.00 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.16 hook-env |
22.8 ± 0.4 | 22.1 | 24.4 | 1.00 |
mise hook-env |
23.0 ± 1.1 | 22.1 | 38.7 | 1.01 ± 0.05 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.16 ls |
19.3 ± 0.4 | 18.6 | 24.3 | 1.01 ± 0.02 |
mise ls |
19.1 ± 0.3 | 18.5 | 21.0 | 1.00 |
xtasks/test/perf
| Command | mise-2026.5.16 | mise | Variance |
|---|---|---|---|
| install (cached) | 171ms | 167ms | +2% |
| ls (cached) | 86ms | 84ms | +2% |
| bin-paths (cached) | 89ms | 86ms | +3% |
| task-ls (cached) | 157ms | 155ms | +1% |
Summary
Context
The failing CI run timed out in
core/test_python_venv_with_go_backend_deadlock_slowwhile cold-installinggo:github.com/charmbracelet/gum@0.17.0. The test still catches real hangs, but gives ordinary Go module downloads/builds more room.Verification
bash -n e2e/core/test_python_venv_with_go_backend_deadlock_slowshellcheck e2e/core/test_python_venv_with_go_backend_deadlock_slowFull targeted e2e was attempted locally but did not reach the test because the local build failed first:
aws-lc-sys/bindgen could not findlibclang.This PR was generated by an AI coding assistant.
Note
Low Risk
Only changes an e2e shell test timeout and cleanup; no production code paths.
Overview
Deflakes the slow Python-venv + Go-backend deadlock e2e by giving
mise installmore time on cold CI (default 180s viaMISE_E2E_INSTALL_TIMEOUT, was a fixed 60s).Go module cache cleanup (
chmod -R +w ~/go) now runs on EXIT so atimeoutkill still leaves the cache writable for teardown instead of only running after a successful run.Reviewed by Cursor Bugbot for commit a7f2f4a. Bugbot is set up for automated code reviews on this repo. Configure here.