feat: Gate datumctl on per-org cloud-portal onboarding#239
feat: Gate datumctl on per-org cloud-portal onboarding#239mattdjenkinson wants to merge 4 commits into
Conversation
Users must finish organization onboarding in the cloud portal before using org- or project-scoped datumctl commands. The check reads each org's OnboardingComplete condition from the user control plane and only runs when a command targets a specific organization.
|
At first glance, the error messaging used here is a little harsh and technical feeling. Can we make it more natural and human friendly? |
Replace technical gate messages with plain-language copy across login, whoami, landing, and the onboarding check helpers.
|
@scotwells good shout, updated! |
|
The messaging here still feels redundant and harsh. Maybe we should explain the recent changes we made to Datum that's now resulting in this error? $ datumctl get organizations
error: Datum Technology, Inc. still needs setup: We couldn't tell if setup is finished yet.
Head to https://cloud.datum.net/org/datum/projects to finish up. |
|
Ah, I think I was running that against production, now I'm getting this: I still wonder if we should provide some context on the recent change we made, especially for older organizations that have been around awhile. Should this also block users from doing the |
|
@scotwells i'm just trying to avoid hardcoding something that might not be really relevant in the long run? We're adding some help copy in the UI for existing orgs so that may be enough? Or we could link to a changelog article? Regarding the get orgs command you're right, we shouldn't be blocking that. How does changing that list to something like this work? It will show which step the org is at in the onboarding process.
|
|
@mattdjenkinson would "STATUS" be a better column name? Onboarding is very specific to first time use and not something that's useful after that. |

Summary
datumctl had no way to tell whether an organization had finished setup in the cloud portal. Milo already tracks that on each org via the
OnboardingCompletecondition, but datumctl never read it. Users could authenticate and hit API errors later with little guidance on what to do next.This PR adds an onboarding check that runs only when a command targets a specific organization (active context,
--organization, or--project). It fetches the org from the user control plane, the same path cloud-portal uses, and blocks org- or project-scoped work when onboarding is incomplete. The error message includes a portal link to that org's projects page, where the portal handles the rest of the redirect flow.How each user path is handled
datumctl loginsaves credentials, discovers zero orgs, opens the cloud portal in the browser, and exits with a message pointing there. The landing page shows the portal URL if the session has no contexts. OAuth browser sign-in still redirects to the datumctl CLI docs after auth (unchanged).whoamiand the landing page show onboarding as complete when a context is set./org/{id}/projects). Scoped commands against that org are blocked with the same link.whoamiand landing show incomplete status for the current context's org only.--organization/--projectfor the org you want.datumctl get organizationsstill work even if another org you belong to is mid-onboarding.--platform-wide).