-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(hc): Add replacements for RPC methods that return tuples #67321
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #67321 +/- ##
==========================================
- Coverage 84.33% 84.33% -0.01%
==========================================
Files 5309 5309
Lines 237230 237271 +41
Branches 41029 41039 +10
==========================================
+ Hits 200073 200105 +32
- Misses 36939 36948 +9
Partials 218 218
|
integration_id: int | None = None, | ||
provider: str | None = None, | ||
external_id: str | None = None, | ||
) -> tuple[RpcIntegration | None, RpcOrganizationIntegration | None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this method have the same signature as get_organization_context__tmp
has in the impl module? The method defined in impl has a return of RpcOrganizationIntegrationContextResult
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing because of the single/plural distinction between get_organization_context
and get_organization_contexts
. There is no corresponding impl for get_organization_context__tmp
. Note also that RpcOrganizationIntegrationContextResult
replaces a tuple that has a list of RpcOrganizationIntegration
as the second element, whereas get_organization_context
returns only a single nullable RpcOrganizationIntegration
.
My goal with get_organization_context
(singular) is to remove it as an @rpc_method
. It's a convenience method that delegates to get_organization_contexts
and unpacks a singleton result. That unpacking step currently happens remotely, but we can do it locally instead by pulling it up into the service class as a concrete method. The change has no performance benefit (it's a single round trip either way) but lets us delete get_organization_context
from the RPC API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah bugger I missed the s
when looking at the method names.
integration_id: int | None = None, | ||
provider: str | None = None, | ||
external_id: str | None = None, | ||
) -> tuple[RpcIntegration | None, RpcOrganizationIntegration | None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah bugger I missed the s
when looking at the method names.
Replaced by #68345 |
This is a step in the process to replace all RPC methods that have a fixed-length tuple as a return type, for the purpose of representing them in OpenAPI.
See #67320