Skip to content

feat: add Cloud Operations API client - #797

Open
xepozz wants to merge 2 commits into
masterfrom
feature/cloud-operations-api
Open

feat: add Cloud Operations API client#797
xepozz wants to merge 2 commits into
masterfrom
feature/cloud-operations-api

Conversation

@xepozz

@xepozz xepozz commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What was changed

Adds CloudClient for 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

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

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
@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners August 20, 2026 12:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +906 to +908
return $this->withContext(
$context->withMetadata(
$context->getMetadata() + ['temporal-cloud-api-version' => [$version]],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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.

[Feature Request] Cloud Operations API Client

1 participant