Skip to content
vxvx
GitHubBlueskydev.toRSS
Releases

Task costs at a glance, runs you can query

Both task lists share one grid with each task's time, wait, cpu, memory, outputs and worker. A run's steps, warnings and failures are tables vx last --sql reads.

vx 0.0.650: Task costs at a glance, runs you can query

A run now shows what each task cost and where it ran, in one grid. What a run leaves behind is in one database you can query.

This release is breaking. Read the breaking changes first.

In this release

To find a slow or memory-hungry task you had to read logs or run vx last. Now the live list and the results list share one grid under one header:

Terminal window
$ vx run build lint test --all
time ±usual waited status cache cpu mem outputs blocks worker task
⏺︎ 205ms success miss 1% 0 local app#lint
⏺︎ 310ms success miss 2% 1 local app#build
⏺︎ 202ms success no-cache 1% 0 local app#test

usual is a task’s median time from local history while it runs, and ±usual is how far it landed from it once it is done. waited is time spent ready but waiting for a slot. blocks counts the tasks downstream of it.

A task with no cache block reads no-cache. worker is local unless a plugin ran the task elsewhere.

See vx run.

Query a run’s steps, warnings and failures

Section titled “Query a run’s steps, warnings and failures”

A run’s steps, its warnings and each failed task’s output were JSON files under the cache dir, out of reach of vx last --sql.

They are now the steps, warnings and failures tables of cache.db:

Terminal window
$ vx last --sql "SELECT task_id, output FROM failures"
task_id output
app#check 2 type errors

A lockfile plugin’s memo is the lockfile_memos table. Artifacts and outputs stay files.

See vx last.

A plugin got cache.db itself through Cache.dbHandle(). It could read or write any table, and a schema change could break it silently.

localHistory(cache, …) is now the only way in, and each call returns plain rows:

import { Cache, localHistory } from '@vzn/vx'
const cache = Cache.inspect(ctx.cacheDir)
try {
const table = await localHistory(cache).loadFor(argv)
} finally {
cache.close()
}

See Writing plugins.

  • A distributed run no longer loses a worker’s result when the cache server answers an upload with a 5xx: @vzn/vx-cache sends it again, three tries in all.
  • The cache server checks tokens with the keys it last read when the CI issuer’s key endpoint is slow.
  • A same-size edit made just as git wrote its index now reaches distributed workers as the new file, not the old one.
  • A plugin’s secret prompt on a terminal that refuses raw mode fails as no-terminal, before its question prints.
Terminal window
vx upgrade

The first run after upgrading resets run history (schema v50; artifacts stay).

  • <cacheDir>/steps/, warnings/, failures/ and lockfile-claims/ → the steps, warnings, failures and lockfile_memos tables.
  • Cache.dbHandle(), LocalHistoryProvider → localHistory(cache, …).
  • Logger.taskStart(node) → taskStart(node, info?) with info.waitedMs.

See also Upgrading.

Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.