Skip to content

Read task queue and workflow id from env for test isolation - #6

Draft
andrewzamojc wants to merge 2 commits into
mainfrom
andrewzamojc/parameterize-task-queue-env
Draft

andrewzamojc wants to merge 2 commits into
mainfrom
andrewzamojc/parameterize-task-queue-env

Conversation

@andrewzamojc

@andrewzamojc andrewzamojc commented Sep 29, 2026 •

Copy link
Copy Markdown

Summary

Parameterize the Task Queue (via TEMPORAL_TASK_QUEUE) and the Workflow Id (via TEMPORAL_WORKFLOW_ID) for test isolation.

  • Task Queue defaults to today's literal — a test harness sets a unique value per run to isolate concurrent runs in one namespace (distinct task queue → no cross-contamination, and it doubles as the discovery key).
  • Workflow Id already defaulted to a unique per-run value (Guid/uuid); it now honors TEMPORAL_WORKFLOW_ID when set, defaulting to that same unique expression. This makes the id predictable/pinnable per run (uniform with the other SDK templates, and handy for temporal 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

  • Builds / parses locally.
  • End-to-end via the cloud-ui harness (--sample-ref andrewzamojc/parameterize-task-queue-env --isolate) against a test namespace.

Draft — opened for review/approval per request.

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.
@andrewzamojc andrewzamojc changed the title Read task queue from env for test isolation Read task queue and workflow id from env for test isolation Sep 29, 2026
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