Take the engine off the path node code imports from, and let it stop
The worker script is handed to the interpreter by path, so app/flow was sys.path[0] for every node: `import queue` got the engine's. It now drops its own directory before anything else imports, and runs with the deployment's credentials scrubbed out of its environment. Also: reload builds off the event loop, the pool wakes what is blocked on it when it stops, a refused metrics flush is kept for the next one rather than dropped, and the cascade events are paired through failures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MeiWk3Yq12n2pTvnQWYvt
This commit is contained in:
@@ -52,6 +52,21 @@ def test_a_manifest_already_applied_is_not_installed_again(
|
||||
assert (venv / ".applied").read_text() == marker
|
||||
|
||||
|
||||
def test_a_missing_uv_is_a_failed_apply_rather_than_a_crash(
|
||||
venv: Path, monkeypatch: pytest.MonkeyPatch
|
||||
):
|
||||
def no_uv(*args: object, **kwargs: object) -> None:
|
||||
raise FileNotFoundError(2, "No such file or directory: 'uv'")
|
||||
|
||||
monkeypatch.setattr(subprocess, "run", no_uv)
|
||||
ok, output = modules.sync("")
|
||||
|
||||
# The route turns this into a 400 with the output; an exception would be a
|
||||
# 500 with nothing in it.
|
||||
assert ok is False
|
||||
assert "uv could not run" in output
|
||||
|
||||
|
||||
def test_a_manifest_that_does_not_resolve_leaves_the_venv_alone(venv: Path):
|
||||
modules.sync("")
|
||||
ok, output = modules.sync("fluksio-no-such-package-anywhere==9.9.9")
|
||||
|
||||
Reference in New Issue
Block a user