Skip to content

feat: create and delete developer sandboxes#389

Open
vegeris wants to merge 5 commits intomainfrom
evegeris-sandbox-integration-create-delete
Open

feat: create and delete developer sandboxes#389
vegeris wants to merge 5 commits intomainfrom
evegeris-sandbox-integration-create-delete

Conversation

@vegeris
Copy link
Contributor

@vegeris vegeris commented Mar 11, 2026

Changelog

Experimental Feature: --experiment sandboxes

We're adding support for managing Slack developer sandboxes from within the CLI. We now allow one to create or delete a sandbox from the CLI.

Summary

This PR adds sandbox create and sandbox delete commands, which allow one to create or delete a sandbox from the CLI.

Follow up to #379

Testing

Try out the commands:

% hermes sandbox create --experiment=sandboxes --name "my-test-box" --password "secretPassword"

% hermes sandbox delete --experiment=sandboxes --sandbox-id E012345

Requirements

@vegeris vegeris added the semver:patch Use on pull requests to describe the release version increment label Mar 11, 2026
@vegeris vegeris force-pushed the evegeris-sandbox-integration-create-delete branch 5 times, most recently from 6a724f1 to 37c62fb Compare March 11, 2026 18:38
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 67.54386% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.03%. Comparing base (4d5f768) to head (a35fbc3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/api/sandbox.go 0.00% 46 Missing ⚠️
cmd/sandbox/create.go 85.83% 10 Missing and 7 partials ⚠️
cmd/sandbox/delete.go 83.05% 6 Missing and 4 partials ⚠️
cmd/sandbox/sandbox.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
+ Coverage   67.01%   67.03%   +0.01%     
==========================================
  Files         218      220       +2     
  Lines       18090    18318     +228     
==========================================
+ Hits        12123    12279     +156     
- Misses       4833     4892      +59     
- Partials     1134     1147      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vegeris vegeris force-pushed the evegeris-sandbox-integration-create-delete branch 2 times, most recently from 98ecc15 to f200970 Compare March 11, 2026 23:43
@vegeris vegeris force-pushed the evegeris-sandbox-integration-create-delete branch from f200970 to cea2bcd Compare March 12, 2026 18:56
@vegeris vegeris marked this pull request as ready for review March 12, 2026 19:00
@vegeris vegeris requested a review from a team as a code owner March 12, 2026 19:00
},
}))
clients.IO.PrintInfo(ctx, false, "Manage this sandbox from the CLI or visit\n%s", style.Secondary("https://api.slack.com/developer-program/sandboxes"))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preview:

% hermes sandbox create --experiment=sandboxes --name "EV test box 7245"  --password "jhsdjdkhfkdfgkgd"

🏖️  Sandbox Created
   Team ID: E0197Q6CTV1
   URL: https://ev-test-box-7245.enterprise.dev.slack.com/

Manage this sandbox from the CLI or visit
https://api.slack.com/developer-program/sandboxes

}

return nil
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preview:

% hermes sandbox delete --experiment=sandboxes --sandbox-id E0196ATAVGT
Choose a Slack team where your email address matches your Slack developer account
? Select a team for authentication slackforceorg E014LMDF01H

⚠️  Danger zone
   Sandbox (E0196ATAVGT) and all of its data will be permanently deleted
   This cannot be undone

? Are you sure you want to delete the sandbox? Yes

✅ Sandbox deleted
   Sandbox E0196ATAVGT has been permanently deleted

🏖️  Developer Sandboxes
   Owned by Slack developer account ev@mail.com

  EV test box 8274368 (E0123456)
    URL: https://ev-test-box-29378.slack.com
    Status: ACTIVE
    Created: 2026-03-12
    Expires: 2026-09-12

Learn more at https://docs.slack.dev/tools/developer-sandboxes

@vegeris vegeris force-pushed the evegeris-sandbox-integration-create-delete branch from b23fbe4 to a35fbc3 Compare March 12, 2026 19:09
Example: style.ExampleCommandsf([]style.ExampleCommand{
{Command: "sandbox create --name test-box --password mypass", Meaning: "Create a sandbox named test-box"},
{Command: "sandbox create --name test-box --password mypass --domain test-box --archive-ttl 1d", Meaning: "Create a temporary sandbox that will be archived in 1 day"},
{Command: "sandbox create --name test-box --password mypass --domain test-box --archive-date 2025-12-31", Meaning: "Create a sandbox that will be archived on a specific date"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it makes sense to support both of these ways of setting archive date; alternatively we could just accept the date. We currently archive sandboxes via a nightly cron job so even if you create a sandbox with a time to live of a few hours, it won't get archived until that job runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant