Skip to content

feat(resourcemanager): Unify organization model and onboarding gate#673

Closed
mattdjenkinson wants to merge 0 commit into
mainfrom
feat/unified-organizations
Closed

feat(resourcemanager): Unify organization model and onboarding gate#673
mattdjenkinson wants to merge 0 commit into
mainfrom
feat/unified-organizations

Conversation

@mattdjenkinson

@mattdjenkinson mattdjenkinson commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Personal and Standard org types split the same resource into two code paths and locked people into workspaces they could not grow out of. This change removes spec.type, adds org-level contactInfo, and introduces a single onboarding gate the API can enforce.

Portal clients create orgs with generateName: org- and a display name only. The mutating webhook defaults that prefix for non-admin callers; the validating webhook rejects user-chosen slugs. An org is onboarding-complete when contact info (email and name), a billing account in the org namespace, and DefaultPaymentMethodReady on that account are all present. The organization controller writes that outcome to status.conditions[OnboardingComplete].

Related enhancement: datum-cloud/enhancements#770. Portal UI work is tracked separately and is not in this PR.

Test plan

  • go build ./...
  • go test ./internal/controllers/resourcemanager/... ./internal/webhooks/resourcemanager/...
  • Chainsaw suites updated for org fixtures without spec.type
  • Manual create with generateName: org- assigns an opaque name and owner membership
  • OnboardingComplete flips to True when contact info and billing payment method are ready

Breaking changes

  • Organization.spec.type is removed. Clients must stop sending or reading it.
  • OrganizationMembership.status.organization.type is removed; contactEmail is cached instead.
  • Non-admin org creates must use metadata.generateName with prefix org-.

Notes for reviewers

  • Depends on go.miloapis.com/billing for typed reads in the onboarding reconciler.
  • Migration steps live in docs/runbooks/unified-organizations-migration.md.
  • Deploy before or with the matching datum PR that removes auto-provision.

Related to #636

@github-actions

Copy link
Copy Markdown
Contributor

🤖 I automatically added missing newlines at the end of 6 file(s) in this PR.

All files should now end with a newline character as per coding standards.

@mattdjenkinson

Copy link
Copy Markdown
Contributor Author

Superseded by #675 — branch was restored after an accidental reset; GitHub would not reopen this PR because it was closed with an empty diff.

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