Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Change coder create | edit envs image flag to take image name and source defaults from image#159

Merged
fuskovic merged 1 commit intomasterfromfaris/ch2149/src-defaults-from-img
Oct 27, 2020

Conversation

fuskovic
Copy link
Contributor

@fuskovicfuskovic commentedOct 26, 2020
edited
Loading

What this does

  • Users can pass the image name to the--image flag instead of having to pass the image id.
  • This applies to both codercreate andedit
  • Codercreate 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

Create environment with custom resource amounts

create_w_custom

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 fromcodercom/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.

edit_image

Change the resource amounts of an environment

edit_resoures

Change both the image and resource amounts of an environment

edit_both

@fuskovicfuskovicforce-pushed thefaris/ch2149/src-defaults-from-img branch 4 times, most recently fromc823160 to7d89f9eCompareOctober 27, 2020 01:12
@fuskovicfuskovic marked this pull request as ready for reviewOctober 27, 2020 01:32
@fuskovicfuskovic requested a review fromcmoogOctober 27, 2020 01:32
@fuskovicfuskovic changed the titleChange coder create envs image flag to take image nameChange coder create | edit envs image flag to take image name and source defaults from imageOct 27, 2020
@fuskovicfuskovicforce-pushed thefaris/ch2149/src-defaults-from-img branch from985b877 to58b4d42CompareOctober 27, 2020 18:19
@fuskovic
Copy link
ContributorAuthor

@tychoish

It looks like all the envs commands take pointers because the value ofuser is propogated by the persistent flaguser upstream in the parent command. Other than that I pushed up all your suggested changes.

@cmoog

Pushed all yours up as well and I updated the PR description to reflect any new changes and behaviors.

@fuskovicfuskovicforce-pushed thefaris/ch2149/src-defaults-from-img branch frome6daf5c to1a2a7ceCompareOctober 27, 2020 18:35
@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍

fuskovic reacted with heart emoji
// 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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍

fuskovic reacted with heart emoji
@fuskovicfuskovicforce-pushed thefaris/ch2149/src-defaults-from-img branch from928f447 toa3dfa5dCompareOctober 27, 2020 18:59
@cmoog
Copy link
Contributor

cmoog commentedOct 27, 2020
edited
Loading

Also- I've been moving towardsSquash and merge. Makes the commit history on master super clean and doesn't require as much force pushing for fixups and such.

fuskovic reacted with thumbs up emoji

@fuskovicfuskovicforce-pushed thefaris/ch2149/src-defaults-from-img branch fromdc19fa2 to9d1ed0dCompareOctober 27, 2020 19:08
@fuskovicfuskovicforce-pushed thefaris/ch2149/src-defaults-from-img branch from0ee26d4 todee3f7cCompareOctober 27, 2020 19:15
@fuskovicfuskovic merged commitcb3ac49 intomasterOct 27, 2020
@fuskovicfuskovic deleted the faris/ch2149/src-defaults-from-img branchOctober 27, 2020 19:21
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@cmoogcmoogcmoog approved these changes

@tychoishtychoishtychoish approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@fuskovic@cmoog@tychoish

[8]ページ先頭

©2009-2025 Movatter.jp