Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion skills/meshstack-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -248,6 +249,26 @@ meshstack bbdv list --definition <definition-uuid> -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 "<runner-uuid>" --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
Expand Down
Loading