This is yet another version focus on easy-to-use -- we know, ticat has certain concepts that seem not very friendly to end-users, this version is about to change it.
Create non-ticat style commands for end-users in seconds
The unix-like flow of ticat is powerful, for example, this is a flow deploying a tiny tidb cluster and do some benchmark then record the result:
$> ticat deploy.preset.min : tidb.new : tpcc.load : tpcc.run : meta.db.local : bench.record
Optionally we could save the flow as a new command my-bench
:
$> ticat deploy.preset.min : tidb.new : tpcc.load : tpcc.run : meta.db.local : bench.record : flow.save my-bench
The saved command is a text file:
# my-bench.tiflow
flow = deploy.preset.min : tidb.new : tpcc.load : tpcc.run : meta.db.local : bench.record
We could share the file in any way we want, our recommandation is put it to a (any) git-repo and the other users can easily access it by:
# download the repo
$> ticat hub.add <git-repo-with-the-file>
# execute the new command
$> ticat my-bench
In this version, we enhance the saved flow (aka, the new command) greatly, now it have an args list automatically (come from the sub-commands it used):
Within a sec, we integrade independent pieces into a powerful command, for further more, we could spend another ten seconds to make it more user-friendly:
- Add a help string by
help = ...
- Hide all ticat style display(callstack, env values, current-executing, etc) by
pack-subflow = true
- The line
args.auto = *
is auto generated, it means all args will be mapped to the new command, we replace it with an args list by hand-picked
# my-bench.tiflow
help = deploy a tidb cluster and benchmark with tpcc
flow = deploy.preset.min : tidb.new : tpcc.load : tpcc.run : meta.db.local : bench.record
pack-subflow = true
# args.auto = *
args.auto = tpcc-threads,tpcc-load-threads,dur
Now, ship it to our friends, they don't need to know anything (about ticat) to use it:
# download the repo
$> ticat hub.add <git-repo-with-the-file>
# check out the usage of the new command
$> ticat help my-bench
# execute the new command, no ticat-related info will be displayed
$> ticat my-bench
Be noticed, all this only take seconds.
As for the feature-provider -- the new command developer, we could check the details of the args-mapping by:
$> ticat cmd.full my-bench
Full execution control for advanced-users
Full infomation and control are provided by ticat for advanced-users when:
- Before executing a command
- During executing a command
- After executing a command
Before execute a command, we could use ticat help my-bench
to get to know how to use, futher more, we could use desc
to get the execution preview:
$> ticat my-bench :desc
During executing, we know how and where the command goes by the executor-info-box:
And we could setup breakpoints before/after a specific command, or run it step-by-step:
# stop before bench
$> ticat break.before tpcc.run : my-bench
# step-by-step from beginning
$> ticat break.here: my-bench
After/during executing, we could list the running/finished flows (aka, the sessions):
$> ticat sessions
For a simple or short flow, we can use ticat sessions.desc <session-id>
to know what is going on / what happened:
For a complicated/long flow, it's not easy to browse the info from session.desc
or session.desc.more
, so we could review the session by retry it (retry, and skip every step):
Since it's paused, we can go into the interactive mode, to check the env values or results for every step(aka, command), this is very helpful in our experiences.
All those features are delivered in previous version but have some bugs during reviewing an executed session, the reviewing process is smooth in this version, enjoy!
Send execution status to lark after executed
Use hook.lark <bot-url>
to send executed status to lark by lark-bot:
$> ticat hook.lark <bot-url> : my-bench
Update to this version by:
ticat update.self