This repository was archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Change coder create | edit envs image flag to take image name and source defaults from image #159
Merged
Conversation
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
c823160
to
7d89f9e
Compare
cmoog
suggested changes
Oct 27, 2020
tychoish
reviewed
Oct 27, 2020
985b877
to
58b4d42
Compare
It looks like all the envs commands take pointers because the value of Pushed all yours up as well and I updated the PR description to reflect any new changes and behaviors. |
tychoish
approved these changes
Oct 27, 2020
e6daf5c
to
1a2a7ce
Compare
cmoog
approved these changes
Oct 27, 2020
@@ -68,6 +68,16 @@ func LogSuccess(header string, lines ...string) { | |||
}.String()) | |||
} | |||
|
|||
// LogWarn prints the given warn message to stderr. | |||
func LogWarn(header string, lines ...string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
// Environment disks can not be shrink so we have to overwrite this | ||
// if the user accidentally requests it or if the default diskGB value for a | ||
// newly requested image is smaller than the current amount the environment is using. | ||
if *updateReq.DiskGB < conf.environment.DiskGB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
928f447
to
a3dfa5d
Compare
Also- I've been moving towards |
dc19fa2
to
9d1ed0d
Compare
cmoog
reviewed
Oct 27, 2020
… defaults from image
0ee26d4
to
dee3f7c
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What this does
--image
flag instead of having to pass the image id.create
andedit
create
andedit
both now source default resource amounts based on the imported image vs arbitrary ones we had previously defined in the CLI.Create
Create environment with default resource amounts
This screenshot also demonstrates some examples of errors users might have.
Create environment with custom resource amounts
Edit
Change the image of an environment
When an environment image is changed and resource amounts are left unspecified, the resource amounts will be changed to that of the default resource amounts specified by the new image the environment will be using.
Also not there's a caveat here in the screenshot it's worth being aware of. Notice when we are going from
codercom/enterprise-dev
toubuntu
that we get a warning message about how we can't reduce the amount of disk storage. The ubuntu default is 10 so the tool is smart enough to recognize that the default amount of the new image for disk is smaller than what it's currently using and keeps it the same while warning the user.Change the resource amounts of an environment
Change both the image and resource amounts of an environment