Skip to content

Show service kind in service list - #17

Merged
lnsp merged 1 commit into
masterfrom
feat/list-kind
Jul 26, 2026
Merged

Show service kind in service list#17
lnsp merged 1 commit into
masterfrom
feat/list-kind

Conversation

@lnsp

@lnsp lnsp commented Jul 26, 2026

Copy link
Copy Markdown
Member

Requires platform 2.5.0, which added kind to the listing response (already deployed).

Before — no indication of type, and batch rows rendered with columns that only mean something for a function:

NAME       VERSION CREATED      LAST DEPLOYED
batchslow  0       9 hours ago  a long while ago
batchdemo  0       10 hours ago a long while ago

That a long while ago is the zero timestamp humanised. It reads as deployed in the distant past when a batch service is never deployed at all.

After:

NAME        KIND     VERSION CREATED      LAST DEPLOYED DOMAINS
batchslow   batch    -       9 hours ago  -
batchdemo   batch    -       10 hours ago -
mlbenchmark function 3       4 years ago  4 years ago   lennart-mlbenchmark.valar.app …

The - for never-deployed also fixes the same misleading output for a function service created but not yet deployed. An empty kind, from a server predating the field, shows - rather than function — that would be a guess presented as fact.

On highlighting: I tried colouring batch cyan and backed it out. tabwriter measures cell width in bytes, so the ANSI sequence makes the cell look ~9 characters wider than it prints and skews every following column. Worth knowing that this already happens wherever colorize() is used inside a tabwriter here — in batch list, the header's EXIT and the row's value don't line up. Happy to fix that repo-wide separately; it needs visible-width-aware padding rather than raw tabwriter.

The listing gave no indication of a service's workload type, and rendered batch
services with columns that only mean something for a function: version 0, and a
"last deployed" humanised from the zero timestamp, which prints as "a long while
ago". That reads as deployed in the distant past when a batch service is never
deployed at all, by design.

Adds a KIND column, and renders version and last-deployed as "-" when a service
has never been deployed -- which also fixes the same misleading output for a
function service that has been created but not yet deployed.

An empty kind, from a server predating the field, shows "-" rather than
"function": that would be a guess presented as fact.

The column is deliberately uncoloured. tabwriter measures cell width in bytes,
so an ANSI sequence makes a cell look about nine characters wider than it prints
and skews the whole table. That is already visible wherever colorize() is used
inside a tabwriter elsewhere in this CLI, and is worth fixing on its own rather
than as a side effect of adding a column.
@lnsp
lnsp merged commit 2a7e8b9 into master Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant