-
Notifications
You must be signed in to change notification settings - Fork 311
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
Start the "login" sequence from "okteto namespace" if needed #919
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
I find that adding this paramater to namespace makes the command more complicated to use.
anyone that doesn't understand the internal implementation is going to be confused by why this parameter is here.
I've been looking around at other tools, and it seems like the pattern of login being separate from the actions is pretty common. I think it's easier to understand when commands only do one thing.
If you feel strongly about having login here, I'd not have the param and then ask the user for the URL (defaulting to okteto cloud).
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.
I see this just as a mere shortcut and it mainly helps reduce the steps to bring users to development from the UI. Currently, the jump from deploy to development takes around 5 - 6 steps when onboarding a new user, back and forth from the UI to the CLI. In the end, the screen to guide users to developments looks like this:
On a big screen, you even have to scroll to see the
okteto up
which is the main command in this sequence... And I really believe we need to do something to reduce this friction.Users starting the process from the UI can benefit from copy/pasting the command with all the needed information to start the process. Just like I do when I'm going to clone a Github repo and don't care about the URL, or when configuring a GKE cluster using the
gcloud
CLI... to name a couple of examples.I think a good start is to launch the
login
process whenever it is needed to remove an extra step. In Okteto Cloud this parameter is not even necessary. It will only be needed if you copy/paste the command from the UI in a Okteto Enterprise installation...So, I do feel strongly about having login here for this reason. I am however open check the idea of prompting the user asking for the URL, like you suggest. But think that this is just optional for the flow initiated from the UI and in Okteto Enterprise.
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.
I'm also open for ideas to simplify the path to development if you have any.
As you know, I'd even go for a more aggressive simplification: a single command that helps the user all the way from the CLI. Which will mean to automatically log in, switch namespaces, and clone (if needed) before doing the
up
. But I know you guys are not very fond of this idea...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.
@pchico83 @rlamana I don't think that bundling commands is a way to simplify the use of okteto. I think this PR makes the namespace command more complex than before. Bundling commands adds complexity to the surface area of the command too. Now the developer needs to understand that
okteto namespace
can also login if she's not logged in, so she might want to pass the URL in case she's not.Pretty much every developer tool I can think of went in the direction of having single use commands, and failing: docker, heroku, terraform, pulumi, snyk. There's no way to pass your credentials during a
docker pull
, for example. It just fails. These companies and tools have spent a lot of effort and research on this topic, so there's a reason why they went on this direction.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.
If you want to keep the behavior of prompting for login, that's fine, but I would not expose it via a parameter.
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.
@rberrelleza how would you expose it?
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.
Use runs
okteto namespace $NAME
like today. If the user is not logged in to okteto cloud, it gets a prompt, where we ask if the user wants to login, ask for the URL (defaulting to cloud), and we do the login action and then if successful, the namespace activation.We can do the same in create/delete namespace. And we should probably mention in all those commands that the action requires an okteto cloud / okteto enterprise account.
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.
@rberrelleza LGTM. @rlamana ?
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.
ok, sounds good to me too