Repository navigation
Add resource id annotation for standalone Nexus operations - #877
Merged
Merged
Conversation
Annotate the standalone Nexus operation RPCs (Start, Describe, Poll,
RequestCancel, Terminate, Delete) with a temporal-resource-id request
header of "nexus-operation:{operation_id}", and add the missing
"activity:{activity_id}" annotation to DeleteActivityExecution so it
matches the rest of the standalone activity RPCs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jiechenz
force-pushed
the
jiechenz/standalone-resource-id
branch
from
October 27, 2026 01:08
64818c9 to
61cfccd
Compare
S15
approved these changes
Oct 27, 2026
yuandrew
approved these changes
Oct 27, 2026
jiechenz
added a commit
that referenced
this pull request
Oct 27, 2026
…897) Stacked on #877. <!-- Describe what has changed in this PR --> **What changed?** - Add `protoc-gen-resource-id-lint`, a protoc plugin that `make` runs in the `grpc` lint step (so CI runs it too). It checks every RPC in every service and fails when: - the RPC has neither a `temporal-resource-id` `request_header` annotation nor an entry in `cmd/protoc-gen-resource-id-lint/exemptions.go`; - an exempted RPC has the annotation; - an exemption names an RPC that does not exist. - Exempt the RPCs that have no single resource to route by: namespace and cluster management, list/count queries, workflow rules, `ShutdownWorker`, deprecated deployment APIs, and all `OperatorService` RPCs. - Add `temporal-resource-id` annotations to RPCs that were missing them, using the same values as their sibling RPCs: - `CreateWorkerDeployment`: `deployment:{deployment_name}` - `CreateWorkerDeploymentVersion`, `UpdateWorkerDeploymentVersionComputeConfig`, `ValidateWorkerDeploymentVersionComputeConfig`: `deployment:{deployment_version.deployment_name}` - `UpdateWorkerVersioningRules`, `GetWorkerVersioningRules`, `UpdateWorkerBuildIdCompatibility`, `GetWorkerBuildIdCompatibility`: `taskqueue:{task_queue}` The check only requires that the annotation is present. It does not validate the annotation value. To exempt a new RPC, add `"<Service>.<Method>": {}` to `exemptions.go`. <!-- Tell your future self why have you made these changes --> **Why?** New RPCs have shipped without a `temporal-resource-id` annotation, for example the standalone Nexus operation RPCs fixed in #877. Requiring the annotation, or an explicit exemption, makes that decision part of every API review. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** None at the wire or code level. The eight new annotations change the request headers SDKs send for those RPCs once they pick up the new protos. <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> **Server PR** None required. After the api-go bump, regenerate `common/rpc/interceptor/routing_key_extractor_gen.go` (`make proto-codegen`) to pick up the eight new annotations.
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Annotate the standalone Nexus operation RPCs (Start, Describe, Poll, RequestCancel, Terminate, Delete) with a temporal-resource-id request header of "nexus-operation:{operation_id}", and add the missing "activity:{activity_id}" annotation to DeleteActivityExecution so it matches the rest of the standalone activity RPCs.
Why?
Breaking changes
Server PR