Declare OPEN_RUNTIMES_CODE_PATH on runtime containers - #253
Merged
Conversation
Set the env from the same $sourceFile used to build the /tmp mount, so the start helper (extract.sh) extracts the archive in place and callers no longer need a cp into /mnt/code in their runtime entrypoint. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Greptile SummaryThe PR aligns non-v2 runtime container metadata with the mounted source archive path.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (4): Last reviewed commit: "fix(runner): only known archive formats ..." | Re-trigger Greptile |
The old naming special-cased .tar and mislabeled everything else as code.tar.gz — including squashfs sources, which only worked because extract.sh sniffs magic bytes. Keep the source's full extension chain (code.tar.gz, code.tar, code.sqfs, code.erofs, ...) so the mounted name, and the OPEN_RUNTIMES_CODE_PATH derived from it, stay truthful. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stored build artifacts are named <uniqid>.gz (pathinfo drops the .tar), so deriving the mount name from the source basename produced code.gz and broke legacy cp-based entrypoints expecting /tmp/code.tar.gz. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The mounted name is a client contract — build commands reference /tmp/code.tar.gz whatever the real format (zip sources, <uniqid>.gz build artifacts). Keep identity only for tar, sqfs, and erofs sources. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
loks0n
added a commit
to appwrite/appwrite
that referenced
this pull request
Sep 1, 2026
Ships OPEN_RUNTIMES_CODE_PATH on runtime containers (open-runtimes/executor#253), which the entrypoints now rely on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
loks0n
added a commit
to appwrite/appwrite
that referenced
this pull request
Sep 1, 2026
* fix(builds): cap the billed build duration at the build timeout Jobs::duration() measures wall clock from buildStartedAt, which the first log callback stamps — so a build that never streamed a line falls back to the deployment's creation time and measures its whole queue wait. That value is what Usage\Build::publish() bills, at memory x duration x cpus, and it is billed for 'failed' exactly as for 'ready'. The executor backend could not produce this: it measured microtime() around the build's own execution, so queue wait was structurally unbillable. Since builds moved to the jobs-service the mean billed duration of a *failed* build has gone 111s (Jun) -> 157s (Jul) -> 491s (Aug) while successful builds held at ~52s, and failed builds are now 57% of all billed build compute fleet-wide. One production project shows the shape plainly: 2,286 of its 2,311 failed August builds have buildStartedAt NULL, empty buildLogs, "exit code -1", and durations at 904-912s. On s-2vcpu-2gb that is ~1.0 GB-hour billed per build that never ran — 1,869 of its 1,878 billed GB-hours for the month. Clamp to _APP_COMPUTE_BUILD_TIMEOUT, the same ceiling Deployments hands the jobs-service as timeoutSeconds: no job outlives it, so nothing past it can have been build time. Guarded so a 0 or negative value leaves the measurement alone rather than zeroing every build. This is a ceiling, not the whole fix — a starved build still bills the full timeout. Billing 0 when buildStartedAt is NULL, and the build fan-out that starves them, are follow-ups. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(builds): drop the build duration cap test Removed at request; the cap in Jobs::duration() is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(compute): drop the cp into /mnt/code from runtime entrypoints The executor now declares OPEN_RUNTIMES_CODE_PATH on runtime containers (open-runtimes/executor#253), so the start helper extracts the archive straight from the /tmp mount and the copy is dead weight on cold starts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump openruntimes/executor to 0.29.0 Ships OPEN_RUNTIMES_CODE_PATH on runtime containers (open-runtimes/executor#253), which the entrypoints now rely on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What
OPEN_RUNTIMES_CODE_PATH=/tmp/<sourceFile>on non-v2 runtime containers, derived from the same$sourceFilevariable used to build the/tmpsource mount..tar→code.tar,.sqfs→code.sqfs,.erofs→code.erofs— instead of everything non-tar being mislabeledcode.tar.gz. Anything else keeps the legacycode.tar.gzname, which client commands reference regardless of the real format (zip sources, build artifacts stored as<uniqid>.gz).Why
The open-runtimes start helper (
extract.sh) extracts the archive named byOPEN_RUNTIMES_CODE_PATHdirectly into the function path. With the executor declaring it, orchestrators (e.g. Appwrite) can drop thecp /tmp/code.* /mnt/code/prefix from their runtime entrypoints instead of duplicating the executor's internal archive naming. Squashfs sources previously only extracted becauseextract.shsniffs magic bytes; their mounted name is now truthful.Counterpart: appwrite/appwrite#13440
🤖 Generated with Claude Code