feat: wrap 30 new RPCs from v0.1.121.0#155
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps 10 new OrganizationService RPCs from proto v0.1.121.0: GetOrganizationByExternalId (now uses dedicated stub), SearchOrganization, DeletePortalLink, DeletePortalLinkByID, GetPortalLinks, CreateOrganizationSessionSettings, GetOrganizationSessionSettings, UpdateOrganizationSessionSettings, DeleteOrganizationSessionSettings, GetOrganizationUserManagementSetting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps 14 new ConnectionService RPCs from proto v0.1.121.0: CreateEnvironmentConnection, AssignDomainsToConnection, GetEnvironmentConnection, ListOrganizationConnections, SearchOrganizationConnections, UpdateEnvironmentConnection, UpdateConnection, DeleteEnvironmentConnection, EnableEnvironmentConnection, DisableEnvironmentConnection, GetConnectionTestResult, ListAppConnections, GetConnectionContext, UpdateConnectionContext. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps 6 new UserService RPCs from proto v0.1.121.0: GetCurrentUser, GetSupportHash, SearchUsers, SearchOrganizationUsers, AssignUserRoles, RemoveUserRole. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds comprehensive gRPC wrapper method coverage across the Scalekit SDK. An RPC manifest file enumerates all available service methods, followed by 13 new connection management methods (environment and organization-scoped), 10 new organization operations (search, portal links, session settings), and 6 new user/role management methods (current user, search, role assignment), each with corresponding test coverage. ChangesAPI Method Expansion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s them in one call Hides the proto two-step (Create then Update) behind a single SDK method. Developers pass settings directly to create; the wrapper handles provisioning and configuration internally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
scalekit/users.py (1)
599-600: 💤 Low valueConsider moving Role import to module level.
The
Roleimport is currently inside theassign_user_rolesmethod. Moving it to the top-level imports (alongside other protobuf types fromscalekit.v1.commons.commons_pb2) would be more consistent with the rest of the codebase.♻️ Proposed refactor
At the top of the file, add:
from scalekit.v1.users.users_pb2 import ( AssignUserRolesRequest, AssignUserRolesResponse, ... ) +from scalekit.v1.commons.commons_pb2 import RoleThen in the method:
- from scalekit.v1.commons.commons_pb2 import Role role_objects = [Role(name=r) for r in roles]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scalekit/users.py` around lines 599 - 600, The Role protobuf is being imported inside assign_user_roles; move the import to module-level with the other protobuf imports (alongside scalekit.v1.commons.commons_pb2 imports) and remove the local "from scalekit.v1.commons.commons_pb2 import Role" line; update any references in assign_user_roles (e.g., role_objects = [Role(name=r) for r in roles]) to use the now top-level Role symbol.scalekit/connection.py (1)
503-532: 💤 Low valueAdd type hint for context parameter.
The
contextparameter inupdate_connection_contextlacks a type annotation, which is inconsistent with the rest of the codebase's type-hinting style.♻️ Proposed fix
def update_connection_context( self, connection_id: str, organization_id: str, - context, + context: Any, ):You may need to add
from typing import Anyif not already present, or use a more specific protobuf message type if available.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scalekit/connection.py` around lines 503 - 532, The update_connection_context method is missing a type annotation for the context parameter; add a type hint (e.g., context: Any or the specific protobuf message type used by UpdateConnectionContextRequest) to the update_connection_context signature, import typing.Any if you choose Any, and update any docstring/type comments to match the chosen type so the signature for update_connection_context and the constructed UpdateConnectionContextRequest are properly typed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@scalekit/connection.py`:
- Around line 503-532: The update_connection_context method is missing a type
annotation for the context parameter; add a type hint (e.g., context: Any or the
specific protobuf message type used by UpdateConnectionContextRequest) to the
update_connection_context signature, import typing.Any if you choose Any, and
update any docstring/type comments to match the chosen type so the signature for
update_connection_context and the constructed UpdateConnectionContextRequest are
properly typed.
In `@scalekit/users.py`:
- Around line 599-600: The Role protobuf is being imported inside
assign_user_roles; move the import to module-level with the other protobuf
imports (alongside scalekit.v1.commons.commons_pb2 imports) and remove the local
"from scalekit.v1.commons.commons_pb2 import Role" line; update any references
in assign_user_roles (e.g., role_objects = [Role(name=r) for r in roles]) to use
the now top-level Role symbol.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9411b0c4-639d-4338-bcc6-ebc49e658e6c
📒 Files selected for processing (7)
.last-rpc-manifest.jsonscalekit/connection.pyscalekit/organization.pyscalekit/users.pytests/test_connection.pytests/test_organization.pytests/test_users.py
…params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Wraps 30 new gRPC RPCs from proto tag
v0.1.121.0across three services. All new methods follow existing wrapper conventions: flat named params, full docstrings,grpc_execerror handling, explicit pagination params where applicable.Methods Added
get_organization_by_external_id(updated to dedicated stub)scalekit/organization.pysearch_organizationsscalekit/organization.pydelete_portal_linkscalekit/organization.pydelete_portal_link_by_idscalekit/organization.pyget_portal_linksscalekit/organization.pycreate_organization_session_settingsscalekit/organization.pyget_organization_session_settingsscalekit/organization.pyupdate_organization_session_settingsscalekit/organization.pydelete_organization_session_settingsscalekit/organization.pyget_organization_user_management_settingscalekit/organization.pycreate_environment_connectionscalekit/connection.pyassign_domains_to_connectionscalekit/connection.pyget_environment_connectionscalekit/connection.pylist_organization_connectionsscalekit/connection.pysearch_organization_connectionsscalekit/connection.pyupdate_environment_connectionscalekit/connection.pyupdate_connectionscalekit/connection.pydelete_environment_connectionscalekit/connection.pyenable_environment_connectionscalekit/connection.pydisable_environment_connectionscalekit/connection.pyget_connection_test_resultscalekit/connection.pylist_app_connectionsscalekit/connection.pyget_connection_contextscalekit/connection.pyupdate_connection_contextscalekit/connection.pyget_current_userscalekit/users.pyget_support_hashscalekit/users.pysearch_usersscalekit/users.pysearch_organization_usersscalekit/users.pyassign_user_rolesscalekit/users.pyremove_user_rolescalekit/users.pyTest plan
tests/test_organization.py,tests/test_connection.py,tests/test_users.pygrpc_execerror handling patternpython3 -m py_compilesyntax check🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Tests