Uh oh!
There was an error while loading. Please reload this page.
feat(cli): add sandbox to projects capabilities enable - #517
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
Add a `Sandbox` variant to `CapabilityName` with `--image-bundle-uri` and `--max-session-lifetime-seconds` flags, plus a match arm that calls `configure_project_sandbox()`. This mirrors the existing `Buckets` arm and closes the CLI parity gap: the API route and generated client already exist, but `alien projects capabilities enable sandbox` failed at clap argument parsing. Both fields are API-required, so the command fails fast when either is missing. The generated `maxSessionLifetimeSeconds` type is `NonZeroU64` and drops the schema maximum, so the CLI validates the 1-28800 range itself. Generated-By: PostHog Desktop Task-Id: 41026261-b3af-4000-8ce9-23edbec6a2b1
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 freeto 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
PUT.alien projects capabilities enable sandboxdies at clap argument parsing:CapabilityNamehasDeployments,Ai,Encryption,Buckets, andRegistry, but noSandbox.PUT /v1/projects/{idOrName}/project-capabilities/sandbox(configureProjectSandbox, added in 940b1fd) — and the generated client method has no caller. The CLI already knows the wordsandboxviaalien deploy --setup-item sandbox, so this is a pure parity gap.Changes
Sandboxvariant toCapabilityNameand a match arm that callsconfigure_project_sandbox(), mirroring theBucketsarm.capabilities enable, both API-required:--image-bundle-uris3://URI (generated newtypetry_from)--max-session-lifetime-seconds1..=28800Note
The generated
maxSessionLifetimeSecondstype isNonZeroU64. typify short-circuits onminimum: 1and drops the schemamaximum, so the type enforces only the lower bound — the CLI validates the1..=28800range itself.Testing
cargo testwas not run: no Rust toolchain is available in this environment.Agent context
Created with PostHog Desktop from this inbox report.