Repository navigation
feat(function): custom sandboxes #6071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
158d832
feat(sandboxes): workspace dependency sets for Function blocks
d5d30b9
Merge remote-tracking branch 'origin/staging' into staging-v11
3f6b6bc
chore(db): regenerate the sandboxes migration as 0273
8849268
chore(db): drop the sandboxes migration ahead of the staging merge
41bc220
Merge remote-tracking branch 'origin/staging' into staging-v11
de81dfe
chore(db): regenerate the sandboxes migration as 0275
6766c36
fix(billing): consolidate the Max-tier entitlement onto one predicate
4509743
chore(db): drop the sandboxes migration ahead of the staging merge
ce615d3
Merge remote-tracking branch 'origin/staging' into staging-v11
49272f3
chore(db): regenerate the sandboxes migration as 0277
71f24cc
feat(sandboxes): gate on the enterprise feature flags, drop the rollo…
8e636dc
fix(sandboxes): let the language menu match its trigger width
3f6f715
fix(sandboxes): re-queue a build when resolution finds the image unus…
20162f6
improvement(sandboxes): let the picker show just the sandbox name
c45c39d
fix(sandboxes): show the sandbox name on the block card, not its uuid
7bcd8fa
fix(sandboxes): hide the Sandboxes section with no provider configured
5893e27
Merge remote-tracking branch 'origin/staging' into staging-v11
3d789d7
docs(sandboxes): correct three claims the code no longer makes
d97ae29
feat(sandboxes): release the provider image when nothing references it
b18d312
fix(sandboxes): rate-limit the automatic rebuild, drop the one-off st…
9b1b022
Merge remote-tracking branch 'origin/staging' into staging-v11
0d68a8c
fix(sandboxes): claim the image row and its reference check in one st…
2d84fe2
Merge remote-tracking branch 'origin/staging' into staging-v11
d9bcc57
fix(sandboxes): route the retention sweep through the same image claim
70ea74b
fix(sandboxes): rebuild a hash adopted while its image was being deleted
d63cfd4
fix(sandboxes): reclaim a ready row whose image was deleted underneat…
e446f2b
Merge remote-tracking branch 'origin/staging' into staging-v11
081485c
fix(sandboxes): let a same-spec save retry a failed build
c505851
docs(sandboxes): correct the image cache's staleness invariant
964b129
docs(sandboxes): note that a JavaScript sandbox needs an import to apply
4170319
Merge remote-tracking branch 'origin/staging' into staging-v11
6fca142
fix(sandboxes): stop create mode surviving a return to an open sandbox
ae753cb
fix(ci): pin the sandbox flag in the second nav catalog test, bump th…
edcfb40
Merge remote-tracking branch 'origin/staging' into staging-v11
a549393
fix(sandboxes): keep the row restore to a refused delete only
29b7442
Merge remote-tracking branch 'origin/staging' into staging-v11
f09dc99
fix(sandboxes): drop the dead row when a re-adopt rebuild cannot be s…
2994141
feat(sandboxes): repair a missing image at create, where the truth is…
af63079
Merge remote-tracking branch 'origin/staging' into staging-v11
4e21e64
fix(sandboxes): key the build trigger by attempt, not by spec
56d0ee7
Merge remote-tracking branch 'origin/staging' into staging-v11
16fd9b5
feat(sandboxes): create a sandbox from the picker, and fix three UI p…
910214d
feat(settings): one Max-plan wall, and give the create modal the same…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { createLogger } from '@sim/logger' | ||
| import { getErrorMessage } from '@sim/utils/errors' | ||
| import { type NextRequest, NextResponse } from 'next/server' | ||
| import { verifyCronAuth } from '@/lib/auth/internal' | ||
| import { withRouteHandler } from '@/lib/core/utils/with-route-handler' | ||
| import { runCleanupSandboxImages } from '@/background/cleanup-sandbox-images' | ||
|
|
||
| export const dynamic = 'force-dynamic' | ||
|
|
||
| const logger = createLogger('CleanupSandboxImagesAPI') | ||
|
|
||
| /** | ||
| * Retention sweep for prebuilt sandbox images. A runtime-strategy deployment has | ||
| * nothing to collect, so the sweep is a no-op there rather than a special case | ||
| * here. | ||
| */ | ||
| export const GET = withRouteHandler(async (request: NextRequest) => { | ||
| const authError = verifyCronAuth(request, 'sandbox image cleanup') | ||
| if (authError) return authError | ||
|
|
||
| try { | ||
| const result = await runCleanupSandboxImages() | ||
| return NextResponse.json({ success: true, ...result }) | ||
| } catch (error) { | ||
| logger.error('Failed to sweep sandbox images', { error }) | ||
| return NextResponse.json( | ||
| { error: getErrorMessage(error, 'Failed to sweep sandbox images') }, | ||
| { status: 500 } | ||
| ) | ||
| } | ||
| }) |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.