feat: add userdata support - #10
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@dwhswenson this is ready for review whenever you are! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 99.73% 99.75% +0.01%
==========================================
Files 13 13
Lines 2690 2818 +128
==========================================
+ Hits 2683 2811 +128
Misses 7 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dwhswenson
approved these changes
Mar 30, 2026
dwhswenson
left a comment
Member
There was a problem hiding this comment.
Finally got that merge done! LGTM
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 free
to 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.
This pull request enhances the DevBox CLI and launch script with improved option handling, user data script support, and overall code consistency. The most significant update is the addition of a
--userdata-fileoption to allow passing a cloud-init script when launching a new EC2 instance. Additionally, the code has been refactored for better readability and consistency, especially in argument parsing and dictionary key usage.User data script support:
--userdata-fileoption to thelaunchCLI command and thelaunch_programmaticinterface, allowing users to specify a cloud-init format script to be passed as instance user data. This includes a newread_userdata_filehelper and the necessary wiring in bothcli.pyandlaunch.pyto read and pass the file contents. [1] [2] [3] [4] [5]CLI and argument parsing improvements:
cli.py. [1] [2] [3] [4]launch.pyto use more readable multi-line calls and consistent double quotes.General code consistency and cleanup:
This PR chooses not to store userdata in AWS because you most likely will not rerun userdata on every launch since most of the time it is used to populate the home directory. This enables you to also use other scripts on launching the new instance if needed.