diff --git a/skills/meshstack-cli/SKILL.md b/skills/meshstack-cli/SKILL.md index 18e40ee1..e110d844 100644 --- a/skills/meshstack-cli/SKILL.md +++ b/skills/meshstack-cli/SKILL.md @@ -163,7 +163,8 @@ Field names worth knowing: `spec.deletionMode`, `spec.dependencyRefs`, `spec.implementation` (for example `terraform` with `repositoryUrl`, `repositoryPath`, `refName`), and `spec.inputs` / `spec.outputs` as maps of name to a declaration (`displayName`, `type`, `assignmentType`, `isSensitive`, `argument` for a - statically bound value). `status.usageCount` counts the blocks on that version. + statically bound value). `spec.runnerRef.uuid` is the runner that executes the runs of building + blocks on that version. `status.usageCount` counts the blocks on that version. - **Run** — `metadata.uuid`, `spec.runNumber`, `spec.behavior` (`APPLY`, `DETECT`), `status` (a plain string here, not an object). `spec.buildingBlock` repeats the block's placement, but its `projectIdentifier` and `fullPlatformIdentifier` are usually null — prefer the block's own @@ -248,6 +249,26 @@ meshstack bbdv list --definition -o ndjson | `refName` is empty on older versions that were not pinned to a commit. +Which definition versions use a given runner, and how many building blocks are on each. Use it +before a runner is removed or replaced. `bbdv list` reads one definition at a time, so loop over the +definitions: + +```sh +meshstack bbd list --limit unlimited -o ndjson | + jq -r '[.metadata.uuid, .spec.displayName] | @tsv' | + while IFS=$'\t' read -r def name; do + meshstack bbdv list --definition "$def" --limit unlimited -o ndjson | + jq -r --arg runner "" --arg name "$name" ' + select(.spec.runnerRef.uuid == $runner) | + [$name, "v\(.spec.versionNumber)", .spec.state, .spec.implementation.type, + (.status.usageCount|tostring)] | @tsv' + done +``` + +A released version keeps its runner, so each line with a `usageCount` above 0 has building blocks +that someone must upgrade to a version that uses another runner. You can change the runner of a +draft version in place. + What a definition version declares as inputs, and how each one is assigned: ```sh