temporalio / temporalio/temporal

Prepopulate run_id in schedule future_action_times

Open
#4,887 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement schedules
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Is your feature request related to a problem? Please describe.
I would like to track workflow executions via some unique identifier such as the run_id, including future workflow executions defined by a schedule.

Describe the solution you'd like
Schedule information currently only provides a run_id for a workflow execution that has already begun. workflow_id isn't guaranteed to be unique when factoring in scheduled and on-demand workflows. Temporal documentation mentions a unique identifier of a workflow execution is the namespace + workflow_id + run_id. Since future_action_times are provided for some portion of future schedule executions, it would be helpful to prepopulate the run_id as well is possible.

Describe alternatives you've considered
Including the schedule information (if applicable) that led to a workflow execution in the workflow description via list_workflows is helpful, but does not provide context for future workflow executions.

Additional context
Existing implementation:

{  
    recent_actions {
        schedule_time {
            seconds: 1695312900
        }
        actual_time {
            seconds: 1695312900
            nanos: 405395930
        }
        start_workflow_result {
            workflow_id: "your-workflow-id-2023-09-21T16:15:00Z"
            run_id: "bae2a0b4-37b8-48f2-8a63-b6afc7d01b0f"
        }
    }
    future_action_times {
        seconds: 1695330900
    }
}

Proposed change:

{  
    recent_actions {
        schedule_time {
            seconds: 1695312900
        }
        actual_time {
            seconds: 1695312900
            nanos: 405395930
        }
        start_workflow_result {
            workflow_id: "your-workflow-id-2023-09-21T16:15:00Z"
            run_id: "bae2a0b4-37b8-48f2-8a63-b6afc7d01b0f"
        }
    }
    future_actions {
        workflow_id: <workflow_id>
        run_id: <workflow run_id>
        schedule_time {
            seconds: 1695330900
        }
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the schedule response that currently exposes recent_actions and future_action_times, including start_workflow_result and its run_id. Review how future scheduled executions are represented and define the API shape and identifier semantics; done means future entries expose the needed workflow_id, run_id, and schedule_time consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.