docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
958 stars 253 forks source link

scout hint: tell user logging in is required #2262

Closed laurazard closed 1 year ago

laurazard commented 1 year ago

The docker scout quickview hint, displayed after a user pulls or builds an image, only works if the user is logged in to Hub.

What I did

Check if user is logged in, and make hint more explicit/call this requirement out if not.

Logged in (same behaviour as before):

image

Logged out (add message about logging in):

image

(not mandatory) A picture of a cute animal, if possible in relation with what you did

image
laurazard commented 1 year ago

/cc @sam-thibault @thaJeztah @dvdksn @neersighted @rumpl @vvoland (pinging y'all re: wording ideas)

thaJeztah commented 1 year ago

So, looking at this hint:

I'm slightly wondering if this is "too much information" at this moment in time, and cluttering the hint (hiding away the relevant information in the noise). Effectively, this is listing prerequisites to run the docker scout command, and we should not end up with "make sure you have a working internet connection: to connect to the internet ..."

So, silly idea:

That would also allow us to include some of the wording we added in https://github.com/docker/cli/pull/4478

Thinking of a flow like:

$ docker scout quickview hello-world
Log in with your Docker ID or email address to use the scout service. If you
don't have a Docker ID, head over to https://hub.docker.com to create one.
You can log in with your password or a Personal Access  Token (PAT). Using
a limited-scope PAT grants better security and is required for organizations
using SSO. Learn more at https://docs.docker.com/go/access-tokens/

Username:
Password:

(we should consider changing Password to Passphrase or Passphrase or PAT, but probably should do so across the board)

laurazard commented 1 year ago

@eunomie thoughts on @thaJeztah's idea?

eunomie commented 1 year ago

I can see why we want to add more context about the docker scout commands. To add (login required) might be OK, let me think a bit more about it. But we probably don't need the second line.

Right now, that's what you have if you run a scout command without to be logged in:

$ docker scout qv alpine:latest
ERROR   Status: login using Docker Desktop or 'docker login' command: no login, Code: 1

That's not a really good user experience. However I'm not sure about the addition of the login inside docker scout. I think the way it's working everywhere right now, is it's up to the user to login (CLI or desktop for instance). So I don't want to include that logic here.

But to improve the login message 💯

eunomie commented 1 year ago

I can change the docker scout login error that way:

image

But I wonder if it isn't too much details for this command, as this message it's more for docker login.