Skip to content

Refactor team → org across multitenant control plane#340

Merged
EDsCODE merged 2 commits intomainfrom
eric/team-to-org-refactor
Mar 23, 2026
Merged

Refactor team → org across multitenant control plane#340
EDsCODE merged 2 commits intomainfrom
eric/team-to-org-refactor

Conversation

@EDsCODE
Copy link
Contributor

@EDsCODE EDsCODE commented Mar 23, 2026

Summary

  • Renames the multi-tenant "team" concept to "org" across the entire control plane
  • DB tables: duckgres_teamsduckgres_orgs, duckgres_team_usersduckgres_org_users
  • DB column: team_nameorg_id
  • Go types: TeamOrg, TeamRouterOrgRouter, TeamStackOrgStack, etc.
  • API routes: /teams/orgs
  • K8s labels: duckgres/teamduckgres/org
  • Prometheus metrics: duckgres_team_*duckgres_org_*
  • File renames: team_router.goorg_router.go, team_reserved_pool.goorg_reserved_pool.go, teams.htmlorgs.html

29 files changed, 641 insertions, 641 deletions — pure rename, no logic changes.

Note: Config store DB must be recreated after merging (GORM AutoMigrate creates new tables but does not rename existing ones).

Companion PR: The provisioning controller branch (eric/provisioning-controller, #332) will need rebasing onto this.

Test plan

  • go build -tags kubernetes . passes
  • go vet -tags kubernetes ./controlplane/... passes
  • Zero remaining team/Team/team_name references in .go, .sql, .html files
  • Config store integration tests pass after DB recreate

🤖 Generated with Claude Code

EDsCODE and others added 2 commits March 22, 2026 22:01
Rename the multi-tenant "team" concept to "org" throughout:
- DB tables: duckgres_teams → duckgres_orgs, duckgres_team_users → duckgres_org_users
- DB column: team_name → org_id
- Go types: Team → Org, TeamUser → OrgUser, TeamConfig → OrgConfig,
  TeamStack → OrgStack, TeamRouter → OrgRouter, etc.
- API routes: /teams → /orgs
- K8s labels: duckgres/team → duckgres/org
- Prometheus metrics: duckgres_team_* → duckgres_org_*
- Files: team_router.go → org_router.go, team_reserved_pool.go →
  org_reserved_pool.go, teams.html → orgs.html

Note: config store DB must be recreated (GORM AutoMigrate creates
new tables but does not rename existing ones).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts from #341 (shared warm worker activation) and #342
(kind-based CI migration), applying the team→org rename to all new
upstream code: activation payloads, reserved pool scheduling, K8s
seed SQL, and test files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@EDsCODE EDsCODE marked this pull request as ready for review March 23, 2026 17:54
@EDsCODE EDsCODE merged commit c079848 into main Mar 23, 2026
19 checks passed
@EDsCODE EDsCODE deleted the eric/team-to-org-refactor branch March 23, 2026 18:16
EDsCODE added a commit that referenced this pull request Mar 23, 2026
Resolve conflicts from the team→org rename (#340), shared warm-worker
activation (#341), and kind CI migration (#342). Preserve provisioning
controller additions (warehouse readiness gating, provisioning API
server, provisioning states) on top of the new org naming and
warm-worker activation features.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EDsCODE added a commit that referenced this pull request Mar 23, 2026
Resolve conflicts from the team→org rename (#340), shared warm-worker
activation (#341), and kind CI migration (#342). Rename remaining
team references in flight_ingress.go and flight_ingress_test.go to
use org naming. Preserve Protocol field in session status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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