Releases: innerr/ticat
Use ticat without any background infomation!
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
An efficient version for usage
In this release, we deliver 3 features could greatly increase the using experiments.
1) Meta file: support macro, support combined format
In the previous version, when we want to do a job in the meta file(the script) like: prepare : conf-1 : run : conf-2 : run
.
It's OK when the step run
don't have args.
But when run
is a tiny flow (like, 2~3 commands) and sometimes having args, we need to provide a "wrapper" command(and another script file) for run
.
The feature macro and combined meta provide an easier way to meet these needs.
Macro example:
help = this is a demo `.ticat` or `.tiflow` meta file
# define a macro `run`
[[run]] = step-1 : step-2
# use macro `run`
flow = prepare : conf-1 : [[run]] : conf-2 [[run]]
Combined meta file example:
### file: app.display.utf8.off.tiflow
help = not use utf8 display by default
flow = display.utf8.off : env.save
### file: app.display.utf8.symbol.off.tiflow
help = not use utf8 symbol display by default
flow = display.utf8.sym.off : env.save
2) Env snapshot toolbox
This version has commands env.snapshot.save <name>
and env.snapshot.load <name>
, it could prevent the default env become a mess.
For example, we could save env to a named-snapshot after prepare
, then load the snapshot before run
.
3) Break point command break.here
It's convenient, some examples:
- Instead of
break.at.begin
, stop at the beginning:ticat break.here : my-job
, then we could do a step-by-step dry-run, or skip some commands in the job. - Instead of
break.at.end
:ticat sessions.last.retry : break.here
, then enter interact-mode, check and save env from an executed job to a snapshot.
To sum up, this version is handy and efficient, enjoy!
Update to this version by:
ticat update.self
Enhance display, bug fixs
- New Features
- Usability
- Compatibility Changes
- Change init repo from innerr/marsh.ticat to ticat-mods/marsh (#132)
- Bug Fixs
- Fix some bugs with tail-mode
A rich featured release version
- All unusual usage hints are removed to make it "normal"
- Breakpoints, step in/out, skip commands during executing
- Interactive mode, with completion
- Pretty display for executed sessions
- Background task supporting (from prev version)
Change log
- New Features
- Support breakpoints and more executing control
- Interactive mode with history and completion #108
- Executed sessions management
- Usability
Support background command by sys-arg "%delay"
From this feature, any command can be run in background by adding a sys-level arg %delay
:
Another example, we use %delay
in a flow named delay-demo
:
What delayed-commands look like in flow desc (aka, command -
):
When we run delay-demo
, the executing panel shows how and when those delayed-commands are scheduled:
The is a bg
area for background running info (zZ
is scheduled but not started yet, >>
is running, ✓
is started and finished):
When main thread is end, each backround command's output will be showed one by one:
Important: the env will be a snapshot at the scheduling time of main thread, any changes in the snapshot(a copy) will not affect the original env in main thread.