Skip to content

devbox new subcommand - #16

Merged
ethanholz merged 9 commits into
omsf-eco-infra:mainfrom
dwhswenson:new-command
May 29, 2026
Merged

devbox new subcommand#16
ethanholz merged 9 commits into
omsf-eco-infra:mainfrom
dwhswenson:new-command

Conversation

@dwhswenson

@dwhswenson dwhswenson commented May 11, 2026

Copy link
Copy Markdown
Member

Although parts of the devbox new command got committed accidentally in other PRs, it looks like I never managed to actually get the code that did the new implementation merged in.

The idea here is to theoretically separate the new and launch subcommands. We can still create on launch, but ideally we'll refactor to reuse the new parameters first, allowing a cleaner code path.

@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.79%. Comparing base (a9844a3) to head (9e53fab).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
+ Coverage   99.76%   99.79%   +0.03%     
==========================================
  Files          17       18       +1     
  Lines        2938     3372     +434     
==========================================
+ Hits         2931     3365     +434     
  Misses          7        7              

☔ 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.

@dwhswenson
dwhswenson marked this pull request as ready for review May 27, 2026 22:43
@dwhswenson
dwhswenson requested a review from Copilot May 27, 2026 22:43
@dwhswenson dwhswenson changed the title [WIP] devbox new subcommand devbox new subcommand May 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR implements the local devbox new flow for creating a READY DevBox project record from an AMI without launching an EC2 instance, and refactors shared AMI lookup/client injection utilities used by launch, snapshot, and manager code.

Changes:

  • Added devbox.new project creation implementation and tests.
  • Extended the Click new command with instance/key defaults and shared param-prefix validation.
  • Added utils.get_image() and refactored AMI lookups across launch, snapshots, and manager code.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/devbox/new.py Adds standalone/programmatic project creation flow.
src/devbox/cli.py Wires devbox new options and shared param-prefix validation.
src/devbox/utils.py Adds injectable AWS helpers and shared AMI lookup helper.
src/devbox/launch.py Uses shared AMI lookup for volume and SSH username handling.
src/devbox/lifecycle/snapshots.py Uses shared AMI lookup during cleanup and mapping creation.
src/devbox/devbox_manager.py Uses shared AMI lookup when deleting AMI snapshots.
tests/test_new.py Adds unit coverage for new project creation and standalone entrypoint.
tests/test_cli.py Adds CLI coverage for new and param-prefix env behavior.
tests/test_utils.py Adds helper injection and AMI lookup tests.
tests/test_launch.py Adds/updates launch username and missing AMI metadata tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/devbox/new.py Outdated
Comment thread src/devbox/new.py Outdated
Comment thread src/devbox/cli.py Outdated
Comment thread src/devbox/new.py
@dwhswenson
dwhswenson requested a review from ethanholz May 28, 2026 05:21
@ethanholz
ethanholz merged commit 2ff1ed6 into omsf-eco-infra:main May 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants