Skip to content

Releases: innerr/ticat

Use ticat without any background infomation!

20 Sep 11:51
6aebaa2
Compare
Choose a tag to compare

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):
image

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

image

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

image

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

image

During executing, we know how and where the command goes by the executor-info-box:
image
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

image

After/during executing, we could list the running/finished flows (aka, the sessions):

$> ticat sessions

image
For a simple or short flow, we can use ticat sessions.desc <session-id> to know what is going on / what happened:
image

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):
image
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

15 Jun 15:45
22e5e48
Compare
Choose a tag to compare

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

01 Apr 03:35
e5b3870
Compare
Choose a tag to compare
  • New Features
    • Run command selftests in parallel mode (#125)
    • Add command branch api; add session id and host ip to env (#128)
    • support quiet-error flag in meta (#129)
    • Command repeat: run a command many times (#139)
    • (Disabled, too many bugs) A command set for dynamic changing flow during executing (#127)
  • Usability
    • not display sensitive(eg: password) key-value or args (#115)
    • add blender.forest-mode: reset env on each command, but not reset on their subflows (#118)
    • move command to global: dbg.break.*, dbg.step, dbg.delay (#126)
    • add commands: list sessions by type (#120)
    • Display enhance and bug fixes
  • 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

28 Dec 18:50
5159344
Compare
Choose a tag to compare
  • 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)

image

image

Change log

  • New Features
    • Support breakpoints and more executing control
      • Command dbg.break.at <cmd-list> #97
      • Command dbg.break.at.begin, step in/out/over #106
    • Interactive mode with history and completion #108
    • Executed sessions management
      • Write logs for each command, shows them in executed session #95
      • Retry an failed session from error point #93
      • Tracing env changes in an executed session #91
      • Display executed session details #86
      • List, add, remove sessions #83
  • Usability
    • Redesign command sets: desc cmds and more, for locating commands easier #98
    • Remove tail-edit-mode usage info from all help-strings and hints, treat it as a hidden hack mode #98

Support background command by sys-arg "%delay"

28 Nov 21:55
8ef377e
Compare
Choose a tag to compare

From this feature, any command can be run in background by adding a sys-level arg %delay:
delay-basic

Another example, we use %delay in a flow named delay-demo:
delay-sync-more

What delayed-commands look like in flow desc (aka, command -):
delay-desc

When we run delay-demo, the executing panel shows how and when those delayed-commands are scheduled:
delay-schedule-info

The is a bg area for background running info (zZ is scheduled but not started yet, >> is running, is started and finished):
delay-bg-info

When main thread is end, each backround command's output will be showed one by one:
delay-main-end

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.

Pre-release, have fun!

24 Aug 19:31
287dd46
Compare
Choose a tag to compare
Pre-release

screenshot-20210831-002522