Skip to content

feat: add workflowRunCreatedAt to context and pass it in invoke requests#178

Merged
CahidArda merged 3 commits intomainfrom
DX-2386-pass-createdAt-in-invoke
Feb 13, 2026
Merged

feat: add workflowRunCreatedAt to context and pass it in invoke requests#178
CahidArda merged 3 commits intomainfrom
DX-2386-pass-createdAt-in-invoke

Conversation

@CahidArda
Copy link
Collaborator

@CahidArda CahidArda commented Feb 4, 2026

We pass the workflow created at to uniquely identify the invoker workflow. This will allow us to update the invoker workflow if the invoked workflow fails.

@linear
Copy link

linear bot commented Feb 4, 2026

Copy link
Collaborator Author

@CahidArda CahidArda left a comment

Choose a reason for hiding this comment

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

Adding some comments to help @mehmettokgoz review

/**
* Creation time of the workflow run
*/
public readonly workflowRunCreatedAt: number;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new workflowRunCreatedAt field in context

telemetry,
invokeCount,
label,
workflowRunCreatedAt: Number(workflowRunCreatedAt),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we assign the value to context as number, not string

[]
[],
{
[WORKFLOW_CREATED_AT_HEADER]: workflowCreatedAt,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if the incoming request has a WORKFLOW_CREATED_AT_HEADER (Upstash-Workflow-CreatedAt), there is workflowCreatedAt in the request when we invoke. Note that it's a number in the invoke payload

@CahidArda CahidArda merged commit 356ee8e into main Feb 13, 2026
43 of 44 checks passed
@CahidArda CahidArda deleted the DX-2386-pass-createdAt-in-invoke branch February 13, 2026 11:20
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.

3 participants

Comments