-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
Description
Display Creating API Key Name in Sandbox Details & List
Description
This feature adds visibility into the origin of a sandbox by displaying the name of the API Key used to create it within the Sandbox Details view. Additionally, it enables filtering the Sandbox List by API Key name.
Problem
In shared environments (e.g., a "Staging" organization used for both CI/CD and local development), multiple API keys often generate sandboxes simultaneously. Currently, there is no easy way to distinguish between sandboxes created by a specific automated process (CI/CD) versus those created by individual developers or other tools. This leads to:
- Audit friction: Hard to trace "who" or "what" spun up a resource.
- Cleanup difficulty: difficult to batch-delete sandboxes generated by a specific stale test run or automation script.
- Ambiguity: "Did I create this, or was it the nightly build?"
Proposal
Backend:
- Persist the
api_key_name(andapi_key_idfor reference) as metadata on theSandboxobject at the time of creation. - Note: Storing the name at creation time is preferred so the record remains readable even if the API Key is later deleted.
Dashboard UI:
- Sandbox Details Pane: Add a new field
Created By(orAPI Key) below the "Created at" timestamp.- Value: Display the API Key Name. If created via the UI (user session), display the User's Name.
- Sandbox List View: Add a filter option to the search/filter bar to select specific API Keys.
CLI:
- Update
daytona sandbox info [ID]to include aCreated Byrow. - Update
daytona sandbox listto support filtering, e.g.,daytona sandbox list --created-by "CI-Pipeline-Key".
DX & UX Implementation:
- Interface:
- Dashboard: In the details pane (as shown in the user's screenshot), insert the field naturally into the existing grid of metadata.
- List Filter: A dropdown multi-select in the web UI for "Creator/API Key".
- Feedback:
- If the API key was deleted, display the name with a subtle indicator, e.g.,
Staging-CI (Deleted). - If the sandbox was created manually by a user (no API key), display the user's avatar/name.
- If the API key was deleted, display the name with a subtle indicator, e.g.,
Acceptance Criteria
- The "Sandbox Details" view in the Dashboard displays the name of the API Key that created the sandbox.
- The Sandbox List view allows filtering by API Key Name.
-
daytona sandbox infoCLI command outputs the creator/key name. - If an API key is deleted, the historical name is still preserved on the sandbox record.
Impact
- Observability: drastically improves the ability to understand resource usage in shared organizations.
- Debugging: Faster identification of rogue scripts or misconfigured CI jobs spawning excess sandboxes.
- Management: Simplifies bulk management of resources tied to specific workflows.