clever-tools
clever-tools copied to clipboard
feat: support --app and --org options
Fixes #587 (and also a part of #586)
This PR adds the support of --app
and --org
options in all commands where an app is involved.
-
--app
can be an app_id or an app_name. -
--org
can be an org_id or an org name.
The first commit adds a smart app resolver which aim is to provide an app ID and owner ID from an --app
or an --alias
. Also, one can pass an --org
to avoid app name ambiguity.
The following commits add the options to the commands and use the smart resolver.
🔎 A preview has been automatically published:
- 🐧 linux
d553eb8eccb075f07be777b88eb3102be14a4ca333b3c2b5c232e00d328a4286
- 🍏 macos
065d5d7d4b9ae40078bd46d146706f395dcd30a2785f2c5f1000982e4ee0760b
- 🪟 win
4dfa6b0fa5cedc476a1ea590164a832d6f270d55f0cc8a1e9c97f72a9d642ab2
This preview will be deleted once this PR is closed.
I run a couple of QA tests ! Thanks for the hard work on it, this is a huge improvement.
The delay of single app command as clever status
can be very long when using only a name
arg:
> time ./clever status --app <APP_NAME>
<APP_NAME>: running (1*XS, Commit: <COMMIT_ID>)
Executed as: REGULAR
Scalability:
Auto scalability: disabled
Scalers: 1
Sizes: XS
Dedicated build: disabled
real 0m5,689s
user 0m0,909s
sys 0m0,146s
> time ./clever status --app <APP_ID>
<APP_NAME>: running (1*XS, Commit: <COMMIT_ID>)
Executed as: REGULAR
Scalability:
Auto scalability: disabled
Scalers: 1
Sizes: XS
Dedicated build: disabled
real 0m0,534s
user 0m0,350s
sys 0m0,057s
The wait delay is better when using an --org
with a name (still around 1s)
Is there way we could improve this command duration?
@pdesoyres-cc Your branch is not rebased on master and there's a conflict on drains to be careful about (sd-params stuff).
🔎 The preview has been automatically deleted.