Repository navigation
Read task queue and workflow id from env for test isolation - #6
Draft
andrewzamojc wants to merge 2 commits into
Draft
andrewzamojc wants to merge 2 commits into
andrewzamojc wants to merge 2 commits into
Conversation
Parameterize the Task Queue via TEMPORAL_TASK_QUEUE, defaulting to the current literal so a copy-paste user is unaffected. A test harness can set a unique value per run to isolate concurrent runs in one namespace. The Workflow Id is already unique per run, so no id change is needed.
The Workflow Id was already unique per run (Guid/uuid). Read TEMPORAL_WORKFLOW_ID when set — defaulting to that same unique expression — so the test harness can pin a predictable id per run (uniform with the other SDKs; handy for describe/reports). A copy-paste user is unaffected: unset env → the original auto-generated id.
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
Parameterize the Task Queue (via
TEMPORAL_TASK_QUEUE) and the Workflow Id (viaTEMPORAL_WORKFLOW_ID) for test isolation.Guid/uuid); it now honorsTEMPORAL_WORKFLOW_IDwhen set, defaulting to that same unique expression. This makes the id predictable/pinnable per run (uniform with the other SDK templates, and handy fortemporal workflow describe/reports).A copy-paste user is completely unaffected: with neither env var set, behavior is identical to before (shared task queue + a freshly generated workflow id).
Why
Enables the Temporal Cloud UI Quickstart-Guide test harness (temporalio/cloud-ui#3286) to run the money-transfer sample concurrently and discover/pin each run precisely. Mirrors the same change across the other money-transfer SDK templates and standalone-activities (temporalio/edu-standalone-activities#88).
Test plan
--sample-ref andrewzamojc/parameterize-task-queue-env --isolate) against a test namespace.Draft — opened for review/approval per request.