fix(mobile): prewarm the selected sandbox image (port #3511)#3596
Open
Gilbert09 wants to merge 1 commit into
Open
fix(mobile): prewarm the selected sandbox image (port #3511)#3596Gilbert09 wants to merge 1 commit into
Gilbert09 wants to merge 1 commit into
Conversation
Thread the selected sandbox environment / custom base image through the mobile cloud-task warm path so a warmed sandbox matches what the task will actually run on. - `warmTask()` now optionally includes `sandbox_environment_id` / `custom_image_id` in the request body (only when set). - `useWarmTask` folds both ids into the debounce/dedupe key, so changing the selection re-warms, and forwards them to the warm call. - `runTaskInCloud` carries the ids on the run so a reused warm sandbox matches the selection instead of a mismatched default. Generated-By: PostHog Code Task-Id: 5c715645-baa3-460e-91ca-73ee7e7fad86
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
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
Mobile prewarms cloud sandboxes, but the warm request dropped the sandbox
environment / custom base image, so a warmed sandbox could be built on a
different image than the task would actually run on — and then get reused
anyway. This ports desktop PR #3511 to mobile.
Why: keep the warm path correct so a reused sandbox always matches the
selected image, matching desktop behaviour.
Changes
warmTask()now optionally sendssandbox_environment_id/custom_image_idin the warm request body (only when set).
useWarmTaskfolds both ids into the debounce/dedupe key, so changing theselection triggers a re-warm, and forwards them to the warm call.
runTaskInCloudcarries the ids on the run so a reused warm sandbox matchesthe selection instead of a mismatched default.
Mobile has no sandbox-environment / custom-image picker today (the ids are only
surfaced read-only via the custom-image badge), so these values are threaded as
optional seams — inert until a selection exists, no new picker UI added.
How did you test this?
api.warm.test.ts,api.test.ts,useWarmTask.test.tsx)covering: ids forwarded when set, omitted when unset, and the warm key
re-warming when the image selection changes.
vitest run src/features/tasks/,196 passing),
tsc --noEmit, andbiome checkon the touched files.Automatic notifications
Created with PostHog Code