Skip to content

Add cross-language encoded tracing header coverage - #943

Open
Sushisource wants to merge 10 commits into
mainfrom
cross-language-encoded-headers
Open

Sushisource wants to merge 10 commits into
mainfrom
cross-language-encoded-headers

Conversation

@Sushisource

@Sushisource Sushisource commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Add run-cross-language for feature folders marked "crossLanguage": true. A conventional driver/ Go program owns scenarios and pair selection; the runner discovers participant files, prepares each selected SDK once, and supplies independently invocable client/worker harness commands. No separate interop folder, embedded language sources, or runner-owned matrix policy.
  • Add tracing/encoded_headers using the real tracing integrations in .NET, Go, Java, Python, Ruby, Rust, and TypeScript. Each pair verifies codec-encoded history, caller/workflow trace identity, input/result round-trip, and no failed Workflow Tasks. The deterministic protobuf/XOR test codec rejects double encoding; no interceptor decodes headers on an SDK's behalf.
  • Use the published releases containing the merged SDK changes: TypeScript 1.26.0, Go OpenTelemetry 0.9.0 with SDK 1.51.0, Java 1.41.1, Python 1.36.1, Ruby 1.11.0, Rust 1.2.0, and .NET 1.22.0. Update dependencies/lockfiles and replace the previous release-blocker notes with reproducible release-only commands.
  • Merge current features main, retain its TypeScript preparation/protobuf fixes, and correct the historical-run exclusion path for the copied sources. Fix this branch's Ruby formatting and Python worker-task typing reported by its earlier CI run.

Why?

Regression coverage for temporalio/sdk-typescript#514, especially the .NET → TypeScript encoded tracing header failure, and cross-SDK validation of the producer-specific opt-ins merged in temporalio/sdk-typescript#2579, temporalio/sdk-go#2818, temporalio/sdk-java#3165, and temporalio/sdk-rust#1734.

The driver owns scenario policy so future compatibility features can test replay, activities, or chains without forcing those shapes into the top-level runner.

Published-release validation

All 49 client → worker combinations passed in one invocation, using only published packages. There are no remaining release blockers.

Client / worker SDK Published version
.NET 1.22.0
Go SDK 1.51.0; contrib/opentelemetry 0.9.0
Java 1.41.1
Python 1.36.1
Ruby 1.11.0
Rust 1.2.0
TypeScript 1.26.0
go run . run-cross-language \
  --sdk-version cs=1.22.0 --sdk-version go=1.51.0 \
  --sdk-version java=1.41.1 --sdk-version py=1.36.1 \
  --sdk-version rb=1.11.0 --sdk-version rs=1.2.0 \
  --sdk-version ts=1.26.0 tracing/encoded_headers

Validation used Node 24.22.0, Ruby 4.0.5, JDK 21, and Temporal CLI 1.10.1 / Server 1.32.2. No local SDK checkout, snapshot dependency, SDK source patch, or scratch proto/submodule workaround was used. This includes the original .NET → TypeScript case and both TypeScript and Rust as encoded-header producers.

PHP has no participant because its inspected SDK has no tracing integration; no synthetic implementation is substituted.

Checklist

  1. Related issue: Normalize Header Data Conversion across languages #850.

  2. How was this tested:

    • Full 49-pair release-only E2E matrix above.
    • go test ./... at the repository root; go build ./... in features; go test ./crosslanguage ./cmd ./harness in harness/go; and go test . in the feature driver. The root Go test required temporarily moving the generated local node_modules out of Go's recursive package discovery; it was restored afterward.
    • npm run build and npm run lint.
    • uv run --with poethepoet poe lint: Ruff import/format checks and mypy passed, including the Python harness. Participant preparation also type-checked 237 source files.
    • rubocop: all 7 Ruby files passed.
    • dotnet test tests/dotnet/Temporalio.Features.Harness.Tests.csproj: 9 passed.
    • From harness/rust: cargo test --locked --features cross-language (7 passed), cargo clippy --locked --features cross-language -- -D warnings, and cargo fmt --check.
    • ./gradlew --offline spotlessApply passed with JDK 11, which is compatible with the repository's pinned google-java-format 1.16.0. The matrix's Java build used JDK 21; a first attempt under the machine's default JDK 27 failed before preparation, and was rerun successfully with JDK 21.
    • git diff --check.

    The previous 16-pair subset and unpublished-SDK blockers have been superseded by this full released-version run. Remote CI for the latest push is not yet verified; the complete Java single-language suite was subsequently rerun as described below; the other single-language suites were not rerun locally.

  3. Any docs updates needed? Root README documents the runner; the feature README documents the codec contract, participant roles, tested published versions, full-matrix invocation, and focused pair selection.

Java CI version-discovery fix

Both Java jobs in run 44427549387 selected 1.30.1 as the latest SDK and failed on activity/standalone with NoClassDefFoundError: io/temporal/client/ActivityClientOptions. Maven Central's search index still reports 1.30.1, while the artifact's repository metadata reports 1.41.1. Explicit version enforcement exposed this stale selection rather than silently running a newer transitive SDK.

Switched Java release discovery to Maven's maven-metadata.xml release field. Added regression coverage for choosing the release rather than a latest snapshot and rejecting metadata without a release. No SDK version override or feature skip was added.

Validated with JDK 23, matching CI:

version=$(go run . latest-sdk-version --lang java) # 1.41.1
go run . run --lang java --version "$version"

The complete Java feature suite passed, including activity/standalone and both worker-shutdown variants. Also prepared an installed Java distribution and successfully ran activity/standalone through --prepared-dir, exercising the execution path used by the Docker image. Go unit tests and vet passed. The Docker image itself was not rebuilt locally; remote CI for this fix remains pending.

@Sushisource
Sushisource marked this pull request as ready for review November 19, 2026 00:16
@Sushisource
Sushisource requested review from a team as code owners November 19, 2026 00:16
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