Open
Description
What are you really trying to do?
I want to generate a UUID deterministically in an Activity (Slack). It works in a real Temporal instance because the activityInfo().workflowExecution.runId
is a UUID, however the MockActivityEnvironment
does not generate UUIDs.
I need to know whether the Workflow run ID is always a UUID, and I can depend on that. If so, the MockActivityEnvironment
should be updated to match that behaviour.
Describe the bug
Minimal Reproduction
import { activityInfo } from "@temporalio/activity"
import * as uuid from "uuid"
export async myActivity(): Promise<string> {
const info = activityInfo()
return uuid.v5(info.activityId, info.workflowExecution.runId)
}
Run this activity in a real instance and it works. Run it with WorkflowTestEnvironment
and it fails with TypeError: Invalid UUID
.
Environment/Versions
@temporalio/testing
: 1.11.7