Repository navigation
Python and TypeScript SDKs: upload Flow Definition Graphs to the Dex Server - #1602
Merged
Merged
Conversation
Add UploadFlowDefinitions, ListFlowDefinitions, and GetFlowDefinitions to FlowService. server-zd keeps one FlowDefinitionRecord object per Flow type under registry/flow-definitions/<tenant_id>/types/, created with If-None-Match and replaced with If-Match by the replace rule.
Document the three FlowService RPCs, the replace rule and force, the flowDefinitions.maxDefinitionBytes key, the object layout under registry/flow-definitions/, and the 0.1.26 change log entries. Add the key to the example configuration and the dexzd-api README. Cover Flow types that contain percent signs, dots, and slashes in the tests.
…to feat/flow-definition-upload-py-ts
…log TS uploads to stderr
This was referenced Nov 11, 2026
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Summary
sdk-python/dex):WorkerOptions.flow_definition_pathsandflow_definitions(FlowDefinitionDocument(flow_type, content, generated_at)), forWorkerandAsyncWorker;Client/AsyncClient.upload_flow_definitions(documents, force=False);FlowDefinitionUploadOutcome(includingUNSPECIFIEDfor values this SDK does not know) andFlowDefinitionUploadResult.sdk-typescript):WorkerOptions.flowDefinitionPathsandflowDefinitions(FlowDefinitionDocument {flowType, content, generatedAt});Client.uploadFlowDefinitions(documents, force); outcome and result types. Upload logs go to stderr (console.warn).flow.name, and duplicate Flow types fail fast); at start, afterSyncAttributeIndexesand before task streams, only registered Flow types are uploaded, in batches of at most 256 items or 16 MiB of content; nothing to upload sends no RPC; failures (UNIMPLEMENTED logged once) are warnings. Absolutesource.pathvalues are rewritten to a working-directory-relative path or the file name, preserving all other bytes.Why
Dex Web features need Flow Definition Graph JSON, which today must sit in a directory next to Dex Web. With server-side storage (#1595), Workers upload the graphs at startup and every Dex Web reads them from the Dex Server. The in-memory option serves frameworks that render graphs at runtime, such as agent session Flows whose Flow type is only known at start. Depends on #1595 (its commits appear here until it merges).
Testing
sdk-python/tests/integ/test_flow_definition_upload_runtime.py(5, including AsyncWorker) andsdk-typescript/test/integ/flow-definition-upload.integration.test.ts(4): path and in-memory upload compared via GetFlowDefinitions, registered-only filtering,source.pathrewrite, duplicate-source error, a rejected document still lets the Worker run a Flow, Client CREATED / UNCHANGED / KEPT_EXISTING / forced REPLACED.cd docs && npm run check,make copyright-check.