[Fix] Inject legacy ROOMOTE_APP_URL alias so pre-rename snapshots resume - #170
Merged
Conversation
Sandboxes resumed from snapshots created before the R_* env rename (#78) run a worker build that hard-requires ROOMOTE_APP_URL at startup, so resume failed with 'ROOMOTE_APP_URL is not set'. Dual-write the alias in the shared worker env builder and the docker spawn override, and scrub it from task processes like R_APP_URL. Remove once pre-rename snapshots have aged out.
Contributor
|
No code issues found. See task Reviewed the legacy |
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
Resuming a task/environment whose sandbox snapshot was created before the R_* env rename (#78) fails with:
The snapshot filesystem contains the pre-rename worker build, which hard-requires
ROOMOTE_APP_URLat startup (apps/worker/src/env/worker-env.tsrequired-vars check in v0.0.3). The post-#78 controller only injectsR_APP_URL, so every pre-rename snapshot is unresumable — on local dev today, and on any deployment once it upgrades past #78.Fix
Dual-write the legacy alias, mirroring the compose-shim approach already used for the expand window:
buildBaseWorkerEnvinjectsROOMOTE_APP_URLalongsideR_APP_URL(all compute providers inherit it).R_APP_URLoverride mirrors to the alias too.ROOMOTE_APP_URLfrom task processes exactly likeR_APP_URL(BLOCKED_USER_FACING_ENV_KEYS).R_APP_URL.ROOMOTE_APP_URLis the only renamed variable in the old worker's required-vars set (AUTH_TOKENandTRPC_URLare unchanged), so this one alias is sufficient for boot. Marked for removal once pre-rename snapshots have aged out.Validation
@roomote/compute-providers113 tests,@roomote/workerenv tests,@roomote/controller90 tests — all passpnpm lint:fast+pnpm check-types:fastpass; pushed--no-verifyfor the known spurious worktree knip failureRelated: #168 (the other #78 boot regression,
R_SLACK_SIGNING_SECRET).