Serialize Host Stopping Event in ActivityShim #2178
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds
FunctionsHostStoppingError
to the list of recognized Activity states in the ActivityShim. In particular, it makesFunctionsHostStoppingError
behave likeFunctionsRuntimeError
, meaning that the Activity would be retried.Currently, on a
FunctionsHostStoppingError
, we default to a case where anInvalidOperationException
is thrown. This causes the result to be stored in the History as an error which cannot be de-serialized, which leads to the exception described in: #2162A second contribution of this PR is that we change the exception type of this default case from
InvalidOperationException
to aTaskFailure
. This is because all exceptions thrown by our shim ought to be de-serializable.Issue describing the changes in this PR
Related to: #2162
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs