Skip to content

plimsoll v0.17.1

Choose a tag to compare

@carrollco carrollco released this 02 Oct 23:25
· 24 commits to main since this release

Fixes from a review of v0.17.0: the warm pool no longer churns when sessions alternate between languages, a docker session never reports docker's own exec failure as the call's exit, Preflight's image environment check is tighter, and the docker provider's Drain is bounded.

Sessions

  • The warm pool's split no longer churns. In a pool of 4 or fewer containers, every language set but the last one asked for was forgotten at the next open, so sessions alternating between JavaScript and Python moved the whole pool on every open and found the wrong interpreter warm. A set is now forgotten only once its weight falls below a quarter of one open's, and the pool moves a container only when the move is clearly worth it (what one set lacks and another holds beyond its share add up to more than 1.25 containers). Alternating callers now cost one container per session, the claimed one's replacement. docs/sessions.md, "A warm pool".
  • docker's exec failures are never a session call's result. docker exec exits 1 for its own failures (a daemon error, a refused exec), not docker run's 125, so v0.17.0 could return such a failure on a running container as the call's exit 1, with docker's message in its stderr. A session snippet's non-zero exit without the call's start marker is now an error.
  • Drain on the docker provider is bounded by its context while the pool is making a container, and returns when the pool's first container failed. Only an embedder that drains while StartSessionPool runs could hit this; plimsolld could not.

Images

  • Preflight compares an image's search path entries (PATH, NODE_PATH, PYTHONPATH and the others) as the directories they name, so //tmp, /usr/../tmp or /./work are refused like /tmp and /work, and it refuses NODE_COMPILE_CACHE, which makes node load cached compiled code for every module.

Clients

  • @plimsollmark/client and the Python client are at 0.17.1, unchanged from 0.17.0 apart from the version.

Upgrading

  • An image whose ENV sets NODE_COMPILE_CACHE, or a search path entry that resolves into /tmp, /work or another writable place however it is spelled, now fails Preflight.