asking about local vs remote inconsistent between add-cloud and add-credential

Bug #1860665 reported by Richard Harding
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Anastasia
2.7
Fix Released
Medium
Anastasia

Bug Description

When adding a cloud I get dropped straight into the workflow and selecting the type, submitting a name, etc. Only at the end do I get the question of adding this new cloud locally or on a controller. I prefer this workflow personally.

When you add a credential you get distracted right off the bat.

    This operation can be applied to both a copy on this client and to the one on a controller.
    No current controller was detected and there are no registered controllers on this client:
    either bootstrap one or register one.
    Do you ONLY want to add a credential to this client? (Y/n):

In this case where I have no controllers I also get questioned about a controller when there is none which seems unnecessary.

It'd be smoother if the commands were more consistent with their workflows.

Revision history for this message
Richard Harding (rharding) wrote :

Interestingly the credentials command deals with the lack of a controller much better. This would be great to also be more consistent.

% juju credentials
No credentials from any controller to display.

Client Credentials:
Cloud Credentials
google company
guimaas rharding
guimaas-ip rharding
localhost localhost*

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Summarizing here our off-line discussion:

1. There is discrepancy when the prompt for client/controller operation happens between commands because some commands, and add-credential is one of them, need to know where the operation happens early as they validate if the cloud exists at the destination. So for consistency sake, it makes sense to prompt first everywhere.

2. If there are no controllers registered on the client, there is no point prompting for location of the operation. We can safely assume that the destination is client. I'll change the prompt accordingly.

3. For read-only commands - lists and show- - we will always try to list both client and controller information without prompting.

Changed in juju:
assignee: nobody → Anastasia (anastasia-macmood)
milestone: none → 2.8-beta1
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I will solve all 3 parts against 2.7 first and then will merge 2.7 into develop.

Part 1 PR: https://github.com/juju/juju/pull/11264 Turns out that 'add-cloud' command was the only inconsistent command. All other commands in the package prompt for client/controller first.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

I have just confirmed in the code that all read-only commands do not prompt, so Part 3 has already been catered for in 2.7 and develop.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

It seems like Part 3 has regressed in develop but works in 2.7. I'll have a look as part of this work.

Revision history for this message
Anastasia (anastasia-macmood) wrote :
Revision history for this message
Anastasia (anastasia-macmood) wrote :

'juju clouds' behavior regressed. This PR fixes regression in develop: https://github.com/juju/juju/pull/11266

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Bringing 2.7 changes into develop is included in this PR: https://github.com/juju/juju/pull/11270

Changed in juju:
status: Triaged → In Progress
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Change into develop is being brought in by https://github.com/juju/juju/pull/11271

Changed in juju:
status: In Progress → Fix Committed
Harry Pidcock (hpidcock)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.