Skip to content

Read task queue from TEMPORAL_TASK_QUEUE (all 6 SDK quickstarts) - #88

Merged
andrewzamojc merged 3 commits into
mainfrom
andrewzamojc/parameterize-task-queue-env
Oct 1, 2026
Merged

andrewzamojc merged 3 commits into
mainfrom
andrewzamojc/parameterize-task-queue-env

Conversation

@andrewzamojc

@andrewzamojc andrewzamojc commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Lets a test harness name the task queue in the standalone-activities quickstarts, so the steps and examples can be exercised automatically against a live server.

Summary

Parameterize the task queue via TEMPORAL_TASK_QUEUE across all six SDK quickstarts (go, typescript, python, java, dotnet, ruby), each defaulting to today's literal (quickstart-standalone-activities). A copy-paste user is unaffected; a test harness can set a unique queue per run to isolate concurrent runs in one namespace (no cross-execution contamination) and use the task queue as a precise discovery key.

Activity ids are already unique per run (greet-<nanos>), so no id change is needed. Worker and client share the value, so they stay in sync.

Per-SDK change (one constant each)

go greet/activity.go · python shared.py · typescript src/shared.ts · java Greeting.java · dotnet Shared.cs (const→static readonly) · ruby shared.rb

Test plan

  • Default preserved when env unset; overridden when TEMPORAL_TASK_QUEUE is set (go, python, ts, ruby checked locally).
  • Validated end-to-end running multiple SDKs concurrently, each on its own unique queue, both COMPLETED, independently confirmed via temporal activity list --query 'TaskQueue=…'.

The go and python standalone-activities quickstarts hardcode the task
queue ("quickstart-standalone-activities"). Read TEMPORAL_TASK_QUEUE
when set, falling back to that same literal, so a copy-paste user is
unaffected but a test harness can isolate each run on its own unique
queue. The activity ids are already unique per run (greet-<nanos>), so
no id change is needed. Worker and client share the value, so they stay
in sync automatically.

Scope: go + python quickstarts. The ts/java/dotnet/ruby quickstarts
follow the same pattern and are a follow-up.
…starts

Extends the go+python change to the remaining four SDK quickstarts: each
reads TEMPORAL_TASK_QUEUE when set, defaulting to the shared literal
("quickstart-standalone-activities"), so a copy-paste user is unaffected
but a test harness can isolate each run on its own unique queue. Activity
ids are already unique per run (greet-<nanos>), so no id change is needed.

@WadeWaldron WadeWaldron left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The comments here seem unnecessary. They read as a history of the change, rather than the current state. They also repeat what the code is saying.

I'd revert the comments to the original version, unless there's something concrete that we can add in the comment.

The code itself seems fine.

This applies to all of the files.

Per review: the added comment lines described the change and repeated
the code. Keep the TEMPORAL_TASK_QUEUE code, restore the original comments.
@andrewzamojc
andrewzamojc merged commit 42f5015 into main Oct 1, 2026
3 checks passed
@andrewzamojc
andrewzamojc deleted the andrewzamojc/parameterize-task-queue-env branch October 1, 2026 16:57
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