Rename sf script to sf cloud-init user-data#96
Closed
coffinsfcompute wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
PR Summary
Renamed the 'script' command to 'cloud-init user-data' in the VM management CLI, improving clarity and organization of cloud initialization configuration commands.
- Added new
cloud-initsubcommand group insrc/lib/vm.tsto better organize VM initialization settings - Added
getcommand to retrieve existing cloud-init user-data configuration - Updated error messages to use consistent "cloud-init user-data" terminology
- Maintained backward compatibility by using same API endpoints (vms_script_post/get)
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
0cd152d to
f697b47
Compare
f697b47 to
d99784e
Compare
JohnPhamous
reviewed
Mar 26, 2025
Comment on lines
+21
to
+29
| const url = await getApiUrl("vms_script_post"); | ||
| const response = await fetch(url, { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| Authorization: `Bearer ${await getAuthToken()}`, | ||
| }, | ||
| body: JSON.stringify({ script: userData }), | ||
| }); |
Contributor
There was a problem hiding this comment.
nit: add spinner. you can prompt cursor to do this.
JohnPhamous
reviewed
Mar 26, 2025
| .description("Push a startup script to VMs") | ||
| .requiredOption("-f, --file <file>", "Path to startup script file") | ||
| vm.command("script").description( | ||
| "OBSOLETE - Now an alias for `sf vm cloud-init user-data set`", |
Contributor
There was a problem hiding this comment.
Suggested change
| "OBSOLETE - Now an alias for `sf vm cloud-init user-data set`", | |
| "Deprecated - Now an alias for `sf vm cloud-init user-data set`", |
JohnPhamous
reviewed
Mar 26, 2025
| } catch { | ||
| logAndQuit("Failed to read script file"); | ||
| } | ||
| console.error("OBSOLETE - Please use `sf vm cloud-init user-data set`."); |
Contributor
There was a problem hiding this comment.
Suggested change
| console.error("OBSOLETE - Please use `sf vm cloud-init user-data set`."); | |
| console.error("Deprecate - Use `sf vm cloud-init user-data set`."); |
JohnPhamous
approved these changes
Mar 26, 2025
Contributor
Author
|
I realized I never added context for why this hasn't been merged. Evan didn't like this so I'm leaving it unmerged until someone can do the work of refactoring our cloud UX. |
Member
|
Closing in favor of: #189 |
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.
Rename for clarity. Also adds
sf vm cloud-init user-data get. Feel free to give suggestions on renaming.