Thread short IDs through CLI display
Problem
Short IDs (PR #696, RFD-69) landed and work — entities on garden have db/short-id allocated, including deployments. But the CLI only uses them in sandbox list. Everywhere else still shows full entity IDs.
Worst offender: app status Recent Activity
Recent Activity:
✓ 2h ago - deployme (175f8dff)
✓ 1d ago - deployme (96e8ea42)
dep.Id()[:8] on deployment-CZdDHFf6Xyy99RrzRkxBg produces the literal string deployme on every line. Useless.
Full hit list
| Command | Column/Field | Today | Should be |
|---|---|---|---|
app status |
Recent Activity ID | deployme (broken [:8] truncation) |
short ID |
app status |
Active Deployment ID | deployment-CZdDHFf6Xyy99RrzRkxBg |
short ID |
app list |
VERSION | meet-vCZZpBkhinRDEt1AfRmNvj |
short ID |
app history |
VERSION | meet-vCZZpBkhinRDEt1AfRmNvj |
short ID |
app history --detailed |
ID | deployment-CZZpBjnfeXcyCV6kbQKXs |
short ID |
sandbox-pool list |
ID | pool-CWGXr1y6iq6SL9Lj1FLsS |
short ID |
sandbox-pool list |
VERSION | heavylog-vCULnGLyy2qUZ6suHok3y5 |
short ID |
sandbox list |
VERSION | mirendev-vCZbYAU5DzHPhhPqZrERNx |
short ID |
sandbox list |
POOL | pool-CZbYCNnnDw4FdpuDspb14 |
short ID |
env set / env delete |
new version | full version ID | short ID |
set (concurrency) |
new version id | full version ID | short ID |
deploy |
blocking deployment ID | full deployment ID | short ID |
activation_poller |
version messages | full version ID | short ID |
Constraint
Most of these IDs come from RPC responses as plain strings (dep.Id(), dep.AppVersionId()), not as entity objects with attributes. ui.BriefId() requires an entity.AttrGetter. Two approaches:
Option A: Enrich RPC responses to include short_id alongside ID fields (deployment info, version info, etc.)
Option B: For list views that already have entities (sandbox pools, sandbox list columns), call BriefId() directly. For RPC-returned IDs, resolve via the entity server's Get() which does ref resolution.
Option C: Hybrid — direct BriefId() where we have entities, enrich RPC for the rest.
Confirmed working
- Garden cluster: short IDs are allocated for all entity types including deployments
sandbox listalready usesui.BriefId()and it works great- The
id:prefix fallback behavior on clusters without short IDs (e.g., prod) needs graceful degradation
Related
- MIR-681 (server-owned deployment lifecycle) — not a blocker, deployments already get short IDs via
CreateEntity - MIR-441 (build process saga) — not a blocker for this work
- PR #696 — original short ID implementation