Conversation
This changes the aptible apps:scale option format to treat container count and container size as two "equal" options, rather than always require container count to be provided as a positional argument and allow container size to be provided as an afterthought. To do so, both options are now positional arguments. I have however also *renamed* one of the options: `--size` is now `--container-size`. The rationale here is that we also use `--size` for `db:create` and `backup:restore` in order to reference the size of the disk, but when we introduce self-service DB scaling, we're going to want to also allow specifying the container size, and that parameter will have to be named differently (presumably `--container-size`). In other words, for the sake of consistency, I'm updating `apps:scale` to use `--container-` prefixes in the options so that the DB operations can use the same parameters going forward. Now, all these changes are potentially breaking changes, which we'd rather avoid, so I've made sure to continue supporting the legacy command line options (I did refactor most tests we had here, but I confirmed the old tests were passing with the new code beforehand, and I've kept tests for the old behavior around). Finally, as we discussed, I also removed the size enum from the `--container-size` option, since API will now be providing the list of valid values if the user tries to use an unsupported size. This ensures we won't need new CLI releases if new sizes are made available.
fcb6bfa to
761a181
Compare
Codecov Report
@@ Coverage Diff @@
## master #224 +/- ##
==========================================
+ Coverage 91.31% 91.58% +0.26%
==========================================
Files 44 44
Lines 1532 1580 +48
==========================================
+ Hits 1399 1447 +48
Misses 133 133
Continue to review full report at Codecov.
|
|
@fancyremarker (and @UserNotFound) as a side note, I wanted to discuss the description we provide for commands. For most commands, we don't show the various flags available in the For comparison, here are two lines from the generic But unlike what's reported there, both commands accept various flags: There are a few things we could do here:
Thoughts? |
|
I like option 3, too, though it sounds like there's not a canonical way to accomplish it with Thor? It might be possible to have a longer help text defined that contains the broader options (that might apply to all At the very least, maybe outline those 'global' options at the top of the output of |
|
Thanks @UserNotFound! I'll open a new issue so we don't lose track of this conversation now that this is merged. |
This changes the aptible apps:scale option format to treat container
count and container size as two "equal" options, rather than always
require container count to be provided as a positional argument and
allow container size to be provided as an afterthought.
To do so, both options are now positional arguments. I have however also
renamed one of the options:
--sizeis now--container-size.The rationale here is that we also use
--sizefordb:createandbackup:restorein order to reference the size of the disk, but when weintroduce self-service DB scaling, we're going to want to also allow
specifying the container size, and that parameter will have to be named
differently (presumably
--container-size).In other words, for the sake of consistency, I'm updating
apps:scaleto use
--container-prefixes in the options so that the DB operationscan use the same parameters going forward.
Now, all these changes are potentially breaking changes, which we'd
rather avoid, so I've made sure to continue supporting the legacy
command line options (I did refactor most tests we had here, but I
confirmed the old tests were passing with the new code beforehand, and
I've kept tests for the old behavior around).
Finally, as we discussed, I also removed the size enum from the
--container-sizeoption, since API will now be providing the list ofvalid values if the user tries to use an unsupported size. This ensures
we won't need new CLI releases if new sizes are made available.
cc @fancyremarker