[JUJU-796] WIP Remove most alias commands
With the exception of relate and status which require more thought
Here is a full list of the command changes from juju:
- Drop
list-actionsin favour ofactions - Drop
list-operationsin favour ofoperations - Drop
upgrade-charmin favour ofrefresh(Is this sensible?) - Drop
remove-consumed-applicationin favour ofremove-saas - Drop
resolvein favour ofresolved(Is this sensible?) - Drop
list-disabled-commandsin favour ofdisabled-commands - Drop
list-cached-imagesin favour ofcached-images - Drop
set-default-credentialin favour ofdefault-credential - Drop
set-default-regionin favour ofdefault-region - Drop
list-cloudsin favour ofclouds - Drop
list-credentialsin favour ofcredentials - Drop
list-regionsin favour ofregions - Drop
show-credentialsin favour ofshow-credential(is this sensible?) - Drop
update-credentialsin favour ofupdate-credential(is this sensible?) - Drop
help-toolandhook-toolsin favour ofhook-tool(is this sensible? A few of references to help-tool in codebase) - Drop
list-ssh-keysin favour ofssh-keys - Drop
sync-toolsin favour ofsync-agent-binaries(is this sensible?) - Drop
upgrade-jujuin favour ofupgrade-model - Drop
list-controllersin favour ofcontrollers - Drop
list-modelsin favour ofmodels - Drop
list-offersin favour ofoffers - Drop
list-firewall-rulesin favour offirewall-rules - Drop
list-machinesin favour ofmachines - Drop
model-defaultin favour ofmodel-defaults(is this sensible?) - Drop
list-commitsin favour ofcommits(wtf??) - Drop
list-charm-resourcesin favour ofcharm-resources - Drop
list-resourcesin favour ofresources - Drop
attachin favour ofattach-resource(is this sensible?) - Drop
list-agreementsin favour ofagreements - Drop
list-plansin favour ofplans - Drop
list-walletsin favour ofwallets - Drop
list-secretsin favour ofsecrets - Drop
list-spacesin favour ofspaces - Drop
debug-hookin favour ofdebug-hooks(is this sensible?) - Drop
list-storagein favour ofstorage - Drop
list-storage-poolsin favour ofstorage-pools - Drop
list-subnetsin favour ofsubnets - Drop
list-usersin favour ofusers - Drop
list-payloadsin favour ofpayloads - Drop
show-statusin favour ofstatus
And from juju-metadata
- Drop
generate-toolsin favour ofgenerate-agents(is this sensible?) - Drop
validate-toolsin favour ofvalidate-agents(is this sensible?)
Checklist
- ~[ ] Requires a pylibjuju change~
- [x] Added integration tests for the PR
- ~[ ] Added or updated doc.go related to packages changed~
- [ ] Comments answer the question of why design decisions were made
QA steps
make static-analysis
go test github.com/juju/juju/cmd/juju/...
go test github.com/juju/juju/cmd/plugins/juju-metadata
go test github.com/juju/juju/payload/status
$ juju help commands | grep Alias
relate Alias for 'add-relation'.
status Alias for 'show-status'.
$ juju list-users
ERROR juju: "list-users" is not a juju command. See "juju --help".
Documentation changes
Probably does require a documentation change or two
Bug reference
N/A
wallets and plans should just be removed rather than worrying about list-* variants. I don't remember any discussion about removing list-* variants. We can certainly discuss it.
I don't like hook-tool because it is the 'help about hook tools' and it is neither plural nor help. Though the singular also exists for the juju hook-tool unit-get (juju hook-tools unit-get is awkward, but so is juju hook-tool listing all hook tools). I think we should have more discussion here. (I'm personally fine with getting rid of juju help-tool )
Hm. maybe I should go one by one, with a caveat that I don't believe we concretely decided to get rid of all list-* variants, but those would be taken as a group (either we should get rid of all of them, or leave them all).
-
Drop upgrade-charm in favour of refresh (Is this sensible?) seems reasonable
-
Drop remove-consumed-application in favour of remove-saas fine
-
Drop resolve in favour of resolved (Is this sensible?) fine
-
Drop set-default-credential in favour of default-credential This one I'm not sure about.
juju default-credential aws myawscredis concrete, but not quite as clear asjuju set-default-credential aws myawscred. More discussion I think. -
Drop set-default-region in favour of default-region Similar to
set-default-credential -
Drop show-credentials in favour of show-credential (is this sensible?) Personally I think the singular and plural forms are helpful to users here.
-
Drop update-credentials in favour of update-credential (is this sensible?) same
-
Drop help-tool and hook-tools in favour of hook-tool (is this sensible? A few of references to help-tool in codebase) I think this needs a bit of design discussion.
-
Drop sync-tools in favour of sync-agent-binaries (is this sensible?) Yes.
-
Drop upgrade-juju in favour of upgrade-model Yes
-
Drop model-default in favour of model-defaults (is this sensible?) It feels awkward when setting one default
juju model-defaults aws foo=bar, I think the singular is still useful here. -
Drop list-commits in favour of commits (wtf??) Ask Joe, but this should be a hidden command anyway (I thought it was only enaled with a feature flag)
-
Drop attach in favour of attach-resource (is this sensible?) We also have
attach-storageso we shouldn't reserve the single word, so I think it is good to drop. -
Drop list-plans in favour of plans
-
Drop list-wallets in favour of wallets wallets and plans should be dropped completely.
-
Drop debug-hook in favour of debug-hooks (is this sensible?) I think it helps users if they can
juju debug-hook mongodb install. -
Drop show-status in favour of status Seems ok. I know we had designs around show being more common (show-unit, etc), but I don't know anyone that uses show-status.
And from juju-metadata
Drop generate-tools in favour of generate-agents (is this sensible?)
Drop validate-tools in favour of validate-agents (is this sensible?)
Those really should be agent-binaries vs agents, though it does make them a bit unweildy (though they are very infrequently used).
Can't keep up with all the command changes. Any chance we can ensure backwards compatibility? We have tools written around as well as documentation and playbooks.
* Drop resolve in favour of resolved (Is this sensible?) fine
I remember a lot of users being confused by "resolved" back when it was the only option. Going back would be quite unpleasant.
Can't keep up with all the command changes. Any chance we can ensure backwards compatibility? We have tools written around as well as documentation and playbooks.
Unfortunately we've been carrying a lot of these for a really long time, and having multiple ways to achieve the same thing breaks any kind of consistency in the command line and makes it difficult for beginners (or not!) to figure out the "right patterns". Note that these changes will land in Juju 3, a major release - which is about the only time we get to make such changes.
* Drop resolve in favour of resolved (Is this sensible?) fineI remember a lot of users being confused by "resolved" back when it was the only option. Going back would be quite unpleasant.
I actually agree here. Most of the commands we have contain a verb/noun combo. resolved vs resolve seems like a strange trade off - I personally feel like juju resolve foo makes more sense.
Revisiting this for the rc release of 3.0.
We've decided to keep both resolve and resolved, since there was some disagreement. The plan is to re-design this in future
We've also decided to keep list-* aliases, as we don't feel the term on it's on juju models, juju controllers is very clear in intention to beginners, particularly given the practice of [binary] [noun] [verb] practised by kubectl and the like
/build
/merge