fix(ml-image-scrub): run tsx directly so the sidecar needs no runtime egress - #70283
Merged
robbie-c merged 1 commit intoJul 13, 2026
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "fix(ml-image-scrub): run tsx directly so..." | Re-trigger Greptile |
robbie-c
marked this pull request as draft
July 12, 2026 12:18
robbie-c
force-pushed
the
posthog-code/ml-image-scrub-sidecar-no-runtime-corepack
branch
2 times, most recently
from
July 12, 2026 13:18
3780805 to
ab0304a
Compare
… egress The sidecar image ran `pnpm start`, which re-invokes corepack at container start and re-downloads pnpm from the npm registry — the build populated root's corepack cache but the container runs as `posthog`, and in production egress is proxy-only, so the fetch is fragile (and needless). Run the tsx bin directly (it's a production dependency) so startup does no network I/O. Generated-By: PostHog Code Task-Id: f63910af-2d0c-4349-af97-c79b3edadaaf
robbie-c
force-pushed
the
posthog-code/ml-image-scrub-sidecar-no-runtime-corepack
branch
from
July 12, 2026 13:20
ab0304a to
6fd7b53
Compare
robbie-c
marked this pull request as ready for review
July 12, 2026 14:16
Contributor
|
Reviews (2): Last reviewed commit: "fix(ml-image-scrub): run tsx directly so..." | Re-trigger Greptile |
robbie-c
enabled auto-merge (squash)
July 12, 2026 14:43
|
Note 🤖 stamphog reviewed Gates denied due to deny-list match on infra/CI-relevant Dockerfile change and T2-never tier; this is container build/deploy tooling with no human or substantive agent review as independent assurance.
Gate mechanics and policy version
|
MarconLP
approved these changes
Jul 13, 2026
robbie-c
deleted the
posthog-code/ml-image-scrub-sidecar-no-runtime-corepack
branch
July 13, 2026 08:21
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.
Problem
The sidecar image ran
pnpm startas its entrypoint. At container start, that re-invokes corepack, which re-downloads pnpm from the npm registry every boot:The build populates corepack's cache as
root, but the container runs as theposthoguser, so the runtime download is never a cache hit. In production this image has no direct internet egress, so the download is fragile as well as pointless.Fix
Run the
tsxbinary directly. It's a production dependency, so it's already installed in the image, and startup does no network I/O.Related
Created with PostHog Code