Skip to content

Pinned api-go to the branch carrying the stream protos. - #3

Open
moedash wants to merge 4 commits into
mainfrom
moe/AI-198-srv-1-api-pin
Open

moedash wants to merge 4 commits into
mainfrom
moe/AI-198-srv-1-api-pin

Conversation

@moedash

@moedash moedash commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

This PR pins the server to the api-go branch that carries the stream protos.

Nothing stream-specific is added here. It is the part of the work that only moves the api dependency and repairs what that move breaks, so the five layers above it start from a tree that builds and tests green.

What changed?

  • go.mod/go.sum replace go.temporal.io/api with github.com/moedash/api-go at the documented head. That branch was rebased onto its upstream main, which pulls newer gRPC, OpenTelemetry and genproto through the module graph.
  • cmd/tools/getproto/files.go lists the nexusoperation and stream protos the new pin ships.
  • tests/mixedbrain/go.{mod,sum} track the root module's gRPC bump, and build-tests runs that module's tests from its own directory since the root go test cannot reach them.
  • clean-test-output removes test.log, which verify-test-log reads whole, so a failure from an earlier run kept failing every later verification.
  • common/metrics/otel_metrics_handler_test.go treats a nil and an empty exemplar slice as equal. The metric SDK returns one or the other depending on whether the reservoir was ever allocated.
  • The System Nexus Endpoint refuses a response that is not binary/protobuf, a port of upstream temporalio/temporal Fix mislabeled "system payload" issue temporalio/temporal#11906. The api version this branch pins rejects such a payload, so the endpoint has to refuse it instead of labelling it.
  • tests/api_fork_test.go round-trips the new command, poll-response and completed-event shapes over the wire. A field added without its descriptor would compile and silently drop on marshal.

Why?

Every later layer depends on the new api, so the pin and its fallout are worth reading on their own rather than mixed into the stream code.

How did you test it?

go build ./...
make proto            # tree stays clean
make fmt              # tree stays clean
go test ./common/metrics/... ./service/history/ -run 'TestMeter|TestStartNexusOperation' -count=1
go test -tags test_dep ./tests/ -run 'TestApiForkCarriesStreamShapes' -count=1
go test -tags test_dep ./tests/ -run 'TestNexusWorkflowTestSuiteCHASM' -count=1

All green.

Series

Server 1 of 6. Replaces #2.

Previous: moe/main (base). Next: #4 moe/AI-198-srv-2-stream-component.

Review round

cmpopts.EquateEmpty() in common/metrics/otel_metrics_handler_test.go applied to the whole comparison, so besides the nil-versus-empty exemplar slice it was added for, it also hid nil-versus-empty differences in attribute sets and data point slices. It is an IgnoreFields on Exemplars now, which is the field the test does not care about.

The System Nexus Endpoint change is already its own commit, Required protobuf payloads from the system Nexus endpoint., so it can be read and reverted on its own. It stays in this PR rather than moving to one of its own: it is a port of an upstream change and the pin is what makes it compile.

Review round: api surface

The api branch renamed AppendStreamRecordsCommandAttributes.stream_id to stream_name and SubscribeStreamCommandAttributes.stream_id to stream_name_or_id, and gave WorkflowStreamRecordsAppendedEventAttributes a from_offset and a to_offset in place of a first offset and a count. Field numbers are unchanged, so the wire does not move. This branch moves the go.temporal.io/api pin onto that head. Nothing here reads the renamed fields yet, so the pin is the whole change.

The branch builds against the fork's api, which pulls newer gRPC and OpenTelemetry through the module graph and ships the nexusoperation and stream protos the import map has to list.
Taken from upstream temporalio/temporal temporalio#11906. The api version this branch pins rejects a system payload that is not binary/protobuf, so the endpoint has to refuse one instead of labelling it.
Equating empty across the whole comparison also hid a nil-versus-empty
attribute set or data point, which is not what the test is about.
The api branch renamed the two stream command fields and reshaped the appended event's range. The layers above this one need the new accessors.
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.

1 participant