Skip to content

[Bug] Update requests should set first_execution_run_id #682

Closed
@dandavison

Description

@dandavison

Update requests do not send first_execution_run_id:

async def start_workflow_update(
self, input: StartWorkflowUpdateInput
) -> WorkflowUpdateHandle[Any]:
# Build request
req = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest(
namespace=self._client.namespace,
workflow_execution=temporalio.api.common.v1.WorkflowExecution(
workflow_id=input.id,
run_id=input.run_id or "",
),
request=temporalio.api.update.v1.Request(
meta=temporalio.api.update.v1.Meta(
update_id=input.update_id or str(uuid.uuid4()),
identity=self._client.identity,
),
input=temporalio.api.update.v1.Input(
name=input.update,
),
),
wait_policy=temporalio.api.update.v1.WaitPolicy(
lifecycle_stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.ValueType(
input.wait_for_stage
)
),
)
if input.args:
req.request.input.args.payloads.extend(
await self._client.data_converter.encode(input.args)
)
if input.headers is not None:
temporalio.common._apply_headers(
input.headers, req.request.input.header.fields
)

However, they should, and other SDKs do.

Also, is it correct that we don't use the run ID from the response when constructing the returned update handle?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions