vfox-poetry: env_keys.lua causes silent 5+ minute hang in CI #8298
Unanswered
marcusrbrown
asked this question in
Troubleshooting and bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The embedded vfox-poetry plugin's
env_keys.luahook silently hangs for 5+ minutes in CI when thepyprojecttool option is set. Three separate env var approaches to disable the behavior all fail due to architectural issues.Environment
Reproduction
In CI (cold runner, no cached venv), the
mise installstep hangs silently atenv_keys.luafor 5+ minutes before being killed by workflow timeouts.Root cause analysis
Three distinct issues compound to make this impossible to work around via env vars:
1.
MISE_POETRY_VENV_AUTOis opt-in only — no way to disable the hookThe env_keys.lua check only recognizes
"1"or"true":Setting
MISE_POETRY_VENV_AUTO=falseor=0has no effect — the code falls through and runs the blockingpoetry run true/poetry installunconditionally. The env var only gates apoetry.lockexistence check, not the venv creation itself.2.
[env]section values are not available to plugin hookstoolset_env.rscallsenv_from_tools()(which invokesEnvKeyshooks) beforeconfig.env()(which applies[env]from mise.toml). So anyMISE_POETRY_*env vars set in[env]never reachos.getenv()in the Lua VM:3. Blocking
os.execute()with no outputThe hook uses
os.execute()andio.popen()with stderr redirected to/dev/null:In CI (cold runner, no cached venv),
poetry run truecreates a virtualenv andpoetry installinstalls all dependencies. Both run silently with no progress output, causing a 5+ minute hang with no indication of what is happening.Workaround
Remove the
pyprojecttool option entirely. The hook returns early at line 43-46 whenpyprojectis not set. Use_.python.venvfor venv creation and explicitpoetry installin CI.Suggested fixes
Add opt-out support: Check
MISE_POETRY_VENV_AUTO != "0"and!= "false"to allow disabling. Or better: checkCIenv var and skip the hook entirely in CI environments.Stream output instead of suppressing it: Remove
2>/dev/nulland2>&1redirections so users can see what is happening during long operations.Apply
[env]before hooks: If[env]values are intended to control plugin behavior (which the namingMISE_POETRY_*implies), they need to be in the process environment beforeEnvKeyshooks execute.Add
--skip-hooksflag: Allowmise install --skip-hooksor a setting likedisable_hooks = ["poetry"]for CI environments.Related
Beta Was this translation helpful? Give feedback.
All reactions