Skip to content

Add system Nexus signalWithStartWorkflow API#2127

Draft
tconley1428 wants to merge 8 commits into
mainfrom
nexus-api-gen-signal-with-start
Draft

Add system Nexus signalWithStartWorkflow API#2127
tconley1428 wants to merge 8 commits into
mainfrom
nexus-api-gen-signal-with-start

Conversation

@tconley1428

Copy link
Copy Markdown
Contributor

Summary

  • add system Nexus TypeScript generation to build:protos using nex-gen
  • expose generated signalWithStartWorkflow workflow API and checked-in generated review output
  • serialize system Nexus envelopes with default JSON through the isolate, then protobuf-binary in the worker while applying codecs only to nested payloads
  • add unit and integration coverage for codec/payload converter behavior

Validation

  • NEX_GEN_BIN=../nexus-api-gen/target/debug/nex-gen pnpm run build:protos
  • pnpm --filter @temporalio/test run build:ts
  • pnpm -C packages/test exec ava ./lib/test-workflow-codec-runner.js
  • pnpm -C packages/test exec ava ./lib/test-system-nexus.js

Notes

  • Draft while the corresponding nex-gen TypeScript export/metadata changes are finalized and published.

Comment thread scripts/gen-system-nexus.ts Outdated
Comment thread packages/worker/src/system-nexus-payload-visitor.ts Outdated
Comment thread packages/worker/src/system-nexus-payload-visitor.ts Outdated
Comment thread packages/worker/src/system-nexus-payload-visitor.ts Outdated
Comment thread packages/worker/src/system-nexus-payload-converter.ts Outdated
Comment thread packages/worker/src/system-nexus-payload-converter.ts
Comment thread packages/worker/src/system-nexus-payload-converter.ts
Comment thread packages/worker/src/system-nexus-payload-converter.ts Outdated
Comment thread .github/workflows/ci.yml
Comment thread scripts/gen-system-nexus.ts Outdated
Comment thread scripts/gen-system-nexus.ts Outdated
Comment thread packages/workflow/package.json Outdated
Comment thread scripts/gen-system-nexus.ts
Comment thread packages/workflow/system-nexus/typescript/temporal_model_converters.ts Outdated
});
}

function generateWorkerVisitor(operations: OperationInfo[], messages: Map<string, MessageInfo>): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unsure how I feel about this. Could we piggyback on protobufjs reflection to just directly implement this instead of generating it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We definitely could, but it isn't the path taken in every other SDK, where we generate the code for efficiency at runtime.

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.

2 participants