temporalio / temporalio/temporal
GetWorkflow doesn't find archived one
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.2k
- Forks
- 1.9k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 228
Description
Expected Behavior
When passing both a workflow and run ID, the SDK should return the desired run for the given workflow, even though this workflow has been archived, right?
So this code should work:
wr := c.GetWorkflow(context.Background(), WorkflowId, RunId)
err = wr.Get(context.Background(), &ptr)
if err != nil {
// ...
}
Actual Behavior
But when executing this, I have the following error:
Workflow executionsRow not found. WorkflowId: <id>, RunId: <id>
It looks like the error comes from temporalio/temporal/blob/master/common/persistence/sql/execution.go#L257
Steps to Reproduce the Problem
- Run a workflow, and wait for it to be archived.
- With the SDK, get the workflow by passing its ID and a run ID.
(I use the file storage for archival, which works fine.)
Specifications
- Version: SDK v1.8.0, Server v1.11.2
- Platform:
darwin
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at common/persistence/sql/execution.go around line 257 and trace the GetWorkflow path used with both WorkflowId and RunId. Reproduce the case after a workflow is archived, then verify that the SDK returns the requested archived run instead of the “Workflow executionsRow not found” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- api, databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100