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

Serialize Host Stopping Event in ActivityShim #2178

Merged
merged 3 commits into from
May 13, 2022

Conversation

davidmrdavid
Copy link
Contributor

@davidmrdavid davidmrdavid commented May 12, 2022

This PR adds FunctionsHostStoppingError to the list of recognized Activity states in the ActivityShim. In particular, it makes FunctionsHostStoppingError behave like FunctionsRuntimeError, meaning that the Activity would be retried.

Currently, on a FunctionsHostStoppingError, we default to a case where an InvalidOperationException 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: #2162

A second contribution of this PR is that we change the exception type of this default case from InvalidOperationException to a TaskFailure. 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

  • My changes do not require documentation changes
    • Otherwise: Documentation PR is ready to merge and referenced in pending_docs.md
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)
  • My changes do not require any extra work to be leveraged by OutOfProc SDKs
    • Otherwise: That work is being tracked here: #issue_or_pr_in_each_sdk
  • My changes do not change the version of the WebJobs.Extensions.DurableTask package
    • Otherwise: major or minor version updates are reflected in /src/Worker.Extensions.DurableTask/AssemblyInfo.cs

@davidmrdavid davidmrdavid changed the title [WIP] handle host stopping event Gracefully handle Host Stopping Event May 12, 2022
@davidmrdavid davidmrdavid changed the title Gracefully handle Host Stopping Event Serialize Host Stopping Event in ActivityShim May 12, 2022
@davidmrdavid davidmrdavid marked this pull request as ready for review May 12, 2022 21:57
@davidmrdavid davidmrdavid requested review from amdeel and cgillum May 12, 2022 21:57
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

:shipit:

@davidmrdavid davidmrdavid merged commit bcdc74b into dev May 13, 2022
@davidmrdavid davidmrdavid deleted the dajusto/add-serialization-to-host-events branch May 13, 2022 18:22
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