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

Add SetFailureConverter to the activity and workflow test environments #1484

Merged

Conversation

boxofrad
Copy link
Contributor

What was changed

Adds a SetFailureConverter method to TestWorkflowEnvironment and TestActivityEnvironment.

Supersedes #1433.

Why?

We use a custom failure converter to marshal/unmarshal structured errors in our application. These errors contain a "code" (similar to a gRPC status) which gets lost without the failure converter, so there are currently certain branches of our code that we're unable to test.

@boxofrad boxofrad requested a review from a team as a code owner May 20, 2024 14:29
@boxofrad
Copy link
Contributor Author

Thanks for the review @Quinn-With-Two-Ns and @cretz 🙌

I've merged the base branch, so it looks like CI might need another approval.

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 06c0ebc into temporalio:master May 21, 2024
13 checks passed
@boxofrad boxofrad deleted the testing-failure-converter branch May 24, 2024 11:51
boxofrad added a commit to boxofrad/sdk-go that referenced this pull request May 24, 2024
Follow up to temporalio#1484.

1. We weren't correctly threading the failure converter down to
   activities and child workflows, so they were still using the
   default converter.

2. The `NonRetryable` flag on the protobuf failure type wasn't being
   honored for custom errors.
Quinn-With-Two-Ns pushed a commit to boxofrad/sdk-go that referenced this pull request May 29, 2024
Follow up to temporalio#1484.

1. We weren't correctly threading the failure converter down to
   activities and child workflows, so they were still using the
   default converter.

2. The `NonRetryable` flag on the protobuf failure type wasn't being
   honored for custom errors.
Quinn-With-Two-Ns pushed a commit that referenced this pull request May 31, 2024
Fix bugs when using a custom `FailureConverter` in tests

Follow up to #1484.

1. We weren't correctly threading the failure converter down to
   activities and child workflows, so they were still using the
   default converter.

2. The `NonRetryable` flag on the protobuf failure type wasn't being
   honored for custom errors.
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