feat: add Cloud Operations API client - #797
Conversation
Generate CloudClient and CloudClientInterface from the CloudService gRPC stub shipped in roadrunner-api-dto 1.15.0. CloudClient::withApiVersion() sets the temporal-cloud-api-version header required by the Cloud Operations API without overriding a header already present on the context. Closes #476
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b159844dc3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return $this->withContext( | ||
| $context->withMetadata( | ||
| $context->getMetadata() + ['temporal-cloud-api-version' => [$version]], |
There was a problem hiding this comment.
Preserve the pinned version for per-call contexts
When a caller supplies the optional $ctx argument—for example, to set a deadline or retry policy—BaseClient::invoke() uses that context instead of getContext(), so the metadata stored here is discarded and temporal-cloud-api-version is not sent. Thus withApiVersion(...)->GetUsers($request, $context) violates the method's every-call contract and can make Cloud Operations requests fail; inject the pinned version during invocation while allowing an explicit version already on the per-call context to win.
Useful? React with 👍 / 👎.
What was changed
Adds
CloudClientfor the Cloud Operations API, generated from the CloudService gRPC stub shipped in roadrunner-api-dto 1.15.0 (roadrunner-php/roadrunner-api-dto#23).withApiVersion()sets the required temporal-cloud-api-version header; a header already on the context wins.Why?
Closes #476.
Checklist
Closes
How was this tested: