Skip to content

cli: migrate multicastgroup, allowlist, user, and globalconfig verbs to async#3789

Merged
juan-malbeclabs merged 3 commits into
mainfrom
jo/cli-multicast-user-globalconfig-async
May 29, 2026
Merged

cli: migrate multicastgroup, allowlist, user, and globalconfig verbs to async#3789
juan-malbeclabs merged 3 commits into
mainfrom
jo/cli-multicast-user-globalconfig-async

Conversation

@juan-malbeclabs
Copy link
Copy Markdown
Contributor

Summary

  • Flip the 5 `multicastgroup` CRUD verbs, 6 `multicastgroup allowlist` verbs (publisher + subscriber `add`/`list`/`remove`), 6 foundation/QA `allowlist` verbs, 8 `user` verbs (`create`, `create-subscribe`, `subscribe`, `request-ban`, `update`, `list`, `get`, `delete`), and 9 `globalconfig` verbs / sub-tree verbs (`get`, `set`, `set-version`, `airdrop`, `authority`, `feature-flags`) to the RFC-20 `pub async fn execute(self, ctx, client, out)` signature.
  • `MulticastGroupCommands::execute` itself flips from sync to async and propagates `ctx` through its nested allowlist arms; the binary's `Multicast` arm becomes `args.command.execute(&ctx, &client, &mut handle).await` (single line).
  • Signature-only sweep. Verb bodies (`--wait` polling in `user create-subscribe`/`subscribe`, the bespoke `multicastgroup update` re-fetch flow, all requirement checks, all output) are unchanged.
  • Test files gain the per-file `block_on` shim and `cli_context_default_for_tests()` import.
  • Forward `&ctx` and `.await` every multicastgroup, allowlist, user, and globalconfig arm in the serviceability dispatcher, the `doublezero` binary, and `controlplane/doublezero-admin`.

Stacked on top of #3787 → ... → #3782. Review and merge in order; this is the last PR in the sequence — after it merges, every serviceability verb is on the RFC-20 `async fn execute(self, ctx, client, out)` contract.

Related RFC: RFC-20 CLI standardization.

Testing Verification

  • All 345 unit tests in `doublezero-serviceability-cli` pass without assertion changes.
  • `make rust-lint` clean across all 9 clippy invocations with `-Dclippy::all -Dwarnings`.
  • `cargo build -p doublezero -p doublezero-admin` clean — the binary and admin dispatchers compile against the new async signatures everywhere.

@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-multicast-user-globalconfig-async branch from 1538cdb to daab059 Compare May 28, 2026 19:28
@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-device-link-async branch 2 times, most recently from 7146659 to a0a4b34 Compare May 28, 2026 19:33
@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-multicast-user-globalconfig-async branch from daab059 to dad3d1b Compare May 28, 2026 19:33
@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-device-link-async branch from a0a4b34 to 03dd64b Compare May 28, 2026 20:40
@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-multicast-user-globalconfig-async branch 2 times, most recently from f92824b to fb3f8bf Compare May 28, 2026 21:17
@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-device-link-async branch 2 times, most recently from 9a9618b to 5026122 Compare May 29, 2026 15:34
Base automatically changed from jo/cli-device-link-async to main May 29, 2026 15:58
…to async

Flip the 5 multicastgroup CRUD verbs (create, update, list, get,
delete), 6 multicastgroup allowlist verbs (publisher + subscriber
add/list/remove), 6 foundation/QA allowlist verbs, 8 user verbs
(create, create-subscribe, subscribe, request-ban, update, list, get,
delete), and 9 globalconfig verbs and sub-tree verbs (get, set, set-
version, airdrop get/set, authority get/set, feature-flags get/set)
to the RFC-20 async fn execute(self, ctx, client, out) signature.

MulticastGroupCommands::execute itself flips from sync to async and
propagates ctx through nested allowlist arms; the binary's Multicast
arm becomes args.command.execute(&ctx, &client, &mut handle).await.
Signature-only sweep: verb bodies (--wait polling, multicastgroup
update re-fetch) are unchanged. Test files gain the per-file block_on
shim and cli_context_default_for_tests() import.

The doublezero binary, admin, and the serviceability dispatcher all
forward ctx and await every multicastgroup, allowlist, user, and
globalconfig arm. All 345 unit tests pass byte-identically.
…nd globalconfig verb tests

Drop the per-verb local block_on copies in favor of the
doublezero_cli_core::testing::block_on helper lifted in the
location PR, matching the location reference verb.
@juan-malbeclabs juan-malbeclabs force-pushed the jo/cli-multicast-user-globalconfig-async branch from a04462b to ad08eea Compare May 29, 2026 16:01
@juan-malbeclabs juan-malbeclabs enabled auto-merge (squash) May 29, 2026 16:30
@juan-malbeclabs juan-malbeclabs merged commit 39436cb into main May 29, 2026
33 checks passed
@juan-malbeclabs juan-malbeclabs deleted the jo/cli-multicast-user-globalconfig-async branch May 29, 2026 16:30
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.

2 participants