Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dev selector typo #3033

Merged
merged 10 commits into from
Aug 31, 2022
Merged

Fix dev selector typo #3033

merged 10 commits into from
Aug 31, 2022

Conversation

teresaromero
Copy link
Member

Fixes #2778

Proposed changes

  • Separate selection logic from GetDevFromManifest. This function will though an error (ErrNoDevSelected) if devName is empty and manifest has multiple devs defined.
  • new SelectDevFromManifest fallback function when err is ErrNoDevSelected, where label is a param that represents the question of the selector

Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #3033 (fed84ba) into master (fcc16ba) will decrease coverage by 0.03%.
The diff coverage is 32.65%.

@@            Coverage Diff             @@
##           master    #3033      +/-   ##
==========================================
- Coverage   32.79%   32.75%   -0.04%     
==========================================
  Files         188      188              
  Lines       19762    19788      +26     
==========================================
+ Hits         6480     6481       +1     
- Misses      12517    12543      +26     
+ Partials      765      764       -1     
Impacted Files Coverage Δ
cmd/doctor.go 0.00% <0.00%> (ø)
cmd/down.go 0.00% <0.00%> (ø)
cmd/push.go 0.00% <0.00%> (ø)
cmd/restart.go 0.00% <0.00%> (ø)
cmd/status.go 0.00% <0.00%> (ø)
cmd/up/up.go 10.62% <0.00%> (-0.09%) ⬇️
cmd/utils/dev.go 33.03% <83.33%> (+0.60%) ⬆️
cmd/exec.go 14.03% <85.71%> (-0.88%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Teresa Romero <teresa@okteto.com>
cmd/utils/dev_test.go Outdated Show resolved Hide resolved
cmd/utils/dev_test.go Outdated Show resolved Hide resolved
@teresaromero teresaromero mentioned this pull request Aug 24, 2022
Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
Copy link
Member

@ifbyol ifbyol left a comment

Choose a reason for hiding this comment

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

@rlamana @RinkiyaKeDad Can you review the text for the elector on each situation, please?

}
}

func SelectDevFromManifest(manifest *model.Manifest, label string) (*model.Dev, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you include a comment in this exported function, please?

Copy link
Member

@RinkiyaKeDad RinkiyaKeDad left a comment

Choose a reason for hiding this comment

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

I've added suggestions for the messages.

Another thing I was thinking was that we could just change all the messages to "Select a development container:" - since the user running the command would know from the command itself what exactly they are selecting the container for. What do you all think?

cmd/doctor.go Outdated Show resolved Hide resolved
cmd/down.go Outdated Show resolved Hide resolved
cmd/exec.go Outdated Show resolved Hide resolved
cmd/push.go Outdated Show resolved Hide resolved
cmd/restart.go Outdated Show resolved Hide resolved
cmd/status.go Outdated Show resolved Hide resolved
cmd/up/up.go Outdated Show resolved Hide resolved
Signed-off-by: Teresa Romero <teresa@okteto.com>
@teresaromero
Copy link
Member Author

teresaromero commented Aug 30, 2022

I've added suggestions for the messages.

Another thing I was thinking was that we could just change all the messages to "Select a development container:" - since the user running the command would know from the command itself what exactly they are selecting the container for. What do you all think?

@RinkiyaKeDad Thnks for the suggestions! I've fixed the strings accordingly.

Regarding the message, i think adding the action that is being performed, although the user knows from the command, is more descriptive.

Signed-off-by: Teresa Romero <teresa@okteto.com>
@teresaromero teresaromero merged commit 47781b1 into master Aug 31, 2022
@teresaromero teresaromero deleted the tere/2778-fix-dev-selector branch August 31, 2022 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typo in prompt when running okteto down
4 participants