Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor update fixes #382

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Minor update fixes #382

merged 2 commits into from
Dec 19, 2024

Conversation

cretz
Copy link
Member

@cretz cretz commented Dec 19, 2024

What was changed

  • Fix issue where proper run ID wasn't set on update handle
  • Fix issue where null and OK statuses weren't being ignored when obtaining multi-op failure

@cretz cretz requested a review from a team December 19, 2024 13:27
@@ -462,7 +472,7 @@ public async override Task<WorkflowUpdateHandle<TResult>> StartWorkflowUpdateAsy
// If the requested stage is completed, wait for result, but discard the update
// exception, that will come when _they_ call get result
var handle = new WorkflowUpdateHandle<TResult>(
Client, req.Request.Meta.UpdateId, input.Id, input.RunId)
Client, req.Request.Meta.UpdateId, input.Id, resp.UpdateRef.WorkflowExecution.RunId)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should really add a test for this. (I know the other fix is hard to test).

Copy link
Member Author

Choose a reason for hiding this comment

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

Added assertion to existing test that would have failed before (basically just ensures run ID now exists, because it was null before)

var grpcStatus = new GrpcStatus() { Code = nonAborted.Code, Message = nonAborted.Message };
grpcStatus.Details.AddRange(nonAborted.Details);
e = new RpcException(grpcStatus);
var nonAborted = failure.Statuses.FirstOrDefault(s =>
Copy link
Contributor

Choose a reason for hiding this comment

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

variable name could be failureStatus or something, but not blocking.

Copy link
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

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

LGTM. I'm going to try to add a test for the run ID issue in Python.

@cretz cretz merged commit 96ece13 into temporalio:main Dec 19, 2024
8 checks passed
@cretz cretz deleted the minor-update-fixes branch December 19, 2024 14:06
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.

2 participants