Skip to content

Swarm names: leave the organization out, and add swarm config name - #40

Merged
evoggy merged 2 commits into
mainfrom
evoggy/swarm-name
Oct 8, 2026
Merged

evoggy merged 2 commits into
mainfrom
evoggy/swarm-name

Conversation

@evoggy

@evoggy evoggy commented Oct 8, 2026

Copy link
Copy Markdown
Member

Follow-up to #35.

Default name of a shared swarm
swarm config create <org>/<swarm> without --name named the swarm after its whole ID, so it was shown as <org>/<swarm> everywhere. The organization only says where the swarm is kept, so the default is now the ID without it: swarm config create bitcraze-lab/demo gives the name demo. Local swarms are still named after their ID.

swarm config name
The name could only be set when creating a swarm. The new command shows it, or sets it, for the selected swarm or the one given with --swarm, local or shared. The ID stays the same.

cfcli swarm config name
cfcli swarm config name "Lab bench" --swarm bitcraze-lab/demo

An empty name is refused (exit 30, invalid value). For a shared swarm the change is uploaded like any other, so it is a new revision and a colleague's change in between is kept.

Testing

  • Unit tests pass; no new clippy warnings.
  • Against a local server with a scratch config folder:
    • create bitcraze/name-test named it name-test; create bitcraze/name-test-2 --name "Soft name" kept the given name; create local-name-test named it local-name-test
    • swarm config name showed and changed the name of a shared swarm (new revision on the server) and of a local one (file updated); a swarm created with the old <org>/<swarm> name could be renamed
    • swarm config name " " was refused with exit 30

evoggy added 2 commits October 8, 2026 22:12
swarm config create named a swarm after its whole ID when --name wasn't
given, so a shared swarm got "<org>/<swarm>" as its name. The organization
only says where the swarm is kept, so leave it out.
The name a swarm is shown with could only be set when creating it. The new
command shows it, or sets it for the selected swarm (or --swarm), local or
shared; the ID stays the same.
@evoggy
evoggy merged commit 3378b52 into main Oct 8, 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