Skip to content

feat: migrate Organization Admin RPCs to connectRPC server #1074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 24, 2025

Conversation

whoAbhishekSah
Copy link
Member

@whoAbhishekSah whoAbhishekSah commented Jul 22, 2025

Migrate Organization AdminRPC to ConnectRPC server

The following RPCs are migrated.

  • ListAllOrganizations
  • AdminCreateOrganization
  • SearchOrganizations
  • SearchOrganizationUsers
  • SearchOrganizationProjects
  • SearchOrganizationInvoices
  • SearchOrganizationTokens
  • SearchOrganizationServiceUserCredentials

The implementation of the handlers is similar to that of the gRPC handlers. I have just made it compatible with ConnectRPC signature. We have used connect errors instead of gRPC errors.

We have also added Server Reflections to support development with tools like Postman.

Copy link

vercel bot commented Jul 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 9:49am

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates Organization Admin RPCs to use the connectRPC server framework, adding new admin endpoints for organization management and enabling gRPC reflection for better tooling support.

  • Adds gRPC reflection support with handlers for both v1 and v1alpha reflection APIs
  • Implements new organization admin endpoints: ListAllOrganizations and AdminCreateOrganization
  • Introduces metadata schema validation for organization creation with proper error handling

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
pkg/server/server.go Adds gRPC reflection handlers for service discovery
internal/api/v1beta1connect/organization.go Implements new admin organization endpoints with filtering and validation
internal/api/v1beta1connect/errors.go Adds metadata validation error definitions
go.mod Adds grpcreflect dependency for reflection support
Comments suppressed due to low confidence (1)

internal/api/v1beta1connect/organization.go:57

  • The variable name 'v' is not descriptive. Consider renaming it to 'org' or 'organization' to improve code readability.
	for _, v := range orgList {

@coveralls
Copy link

coveralls commented Jul 22, 2025

Pull Request Test Coverage Report for Build 16440758135

Details

  • 0 of 394 (0.0%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 31.283%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/server/server.go 0 10 0.0%
internal/api/v1beta1connect/organization_serviceuser_credentials.go 0 35 0.0%
internal/api/v1beta1connect/organization_tokens.go 0 39 0.0%
internal/api/v1beta1connect/organization_projects.go 0 50 0.0%
internal/api/v1beta1connect/organization_invoices.go 0 52 0.0%
internal/api/v1beta1connect/organization.go 0 53 0.0%
internal/api/v1beta1connect/organization_users.go 0 56 0.0%
internal/api/v1beta1connect/organization_billing.go 0 99 0.0%
Totals Coverage Status
Change from base Build 16408741807: -0.4%
Covered Lines: 10073
Relevant Lines: 32200

💛 - Coveralls

@whoAbhishekSah whoAbhishekSah merged commit b25e1f5 into main Jul 24, 2025
7 checks passed
@whoAbhishekSah whoAbhishekSah deleted the connectrpc_admin_org branch July 24, 2025 08:17
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.

3 participants