feat(services): embed services list/enable/status in datumctl core - #250
Merged
Conversation
Add datumctl services list/enable/status so users can see which Datum Cloud services are available for a project, request access, and check entitlement state — available in core the same way activity/ctx/console are, with no separate plugin install. Plugins such as compute point users at this command in their own error messages, so it needs to ship in the base binary. Wires the go.miloapis.com/service-catalog/pkg/cmd group with two lazy REST-config resolvers (Service lives platform-wide, ServiceEntitlement in the project VCP) and a lazy Project resolver reading live scope at RunE time, so a --project flag is honored. main.go maps activation exit codes through the top-level error path.
scotwells
marked this pull request as ready for review
July 14, 2026 00:14
ecv
approved these changes
Jul 14, 2026
privateip
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What you get
datumctl services list,datumctl services enable <name>, anddatumctl services status <name>— see which Datum Cloud services are available for your current project, request access to one, and check where a request stands (enabled, pending approval, denied, or not requested).These ship in datumctl core, the same way
activity,ctx, andconsoledo — no separate plugin install. That matters because plugins likecomputealready point users atdatumctl services enable computein their own error messages, so the command has to exist in the base binary for that guidance to work.How it works
Wires the shared
go.miloapis.com/service-catalog/pkg/cmdcommand group into the root command tree. The two scopes it spans have no single API serving both —Servicelives only at the platform-wide root,ServiceEntitlementonly inside a project's virtual control plane — so the command is given two lazy REST-config resolvers plus a lazy project resolver that reads live scope at RunE time (so a--projectflag on the invocation is actually honored, rather than a value captured when the command tree was built).main.goroutes the activation exit code through the existing top-level error path.Replaces the draft SDK
This supersedes the draft service-activation SDK in #242 — the reusable logic now lives in service-catalog's
pkg/activation+pkg/cmdand is imported rather than reimplemented here. #242 should be closed once this is confirmed good (handled separately).Dependency / merge caveat
The
service-catalogdependency is currently pinned to an unmerged, untagged commit (a002414) on milo-os/service-catalog#52. It will need re-pinning to a tagged release before this can merge — the same pin-chain sequencing this project has hit before (merge + tag service-catalog first, then re-pin here).Related:
pkg/cmd, the services command group (the dependency this PR consumes; also carries the lazy-Projectfix)pkg/activation, the shared enablement SDK underneath itVerification
go build ./...,go vet ./...,gofmtall clean.services listreturns real entitlement state for a real project;--project <id>correctly overridesDATUM_PROJECT, confirming the lazy project resolver reflects flag precedence at RunE time (this was the bug the service-catalog side fixed); the no-scope case returns the expected "no project set" guidance.🤖 Generated with Claude Code