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

Send InvocationCancel request to out-of-proc workers #8556

Merged
merged 19 commits into from
Aug 15, 2022

Conversation

liliankasem
Copy link
Member

@liliankasem liliankasem commented Jul 19, 2022

Issue describing the changes in this PR

resolves #2152

Implementing the InvocationCancel message so provide cancellation token support for out-of-proc language workers.

First, we setup the CancellationToken from WebJobs to be passed into the invocation context parameters list. This enables us to flow the CancellationToken to the InvokeCore method and eventually to SendInvocationRequest.

Within SendInvocationRequest, we register a callback for the CancellationToken so that when it is cancelled, we send the InvocationCancel message to the worker. This feature is built behind a worker capability flag, if a worker does not have a cancellation capability, we will not send the InvocationCancel message

Design document available in the wiki.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • 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
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Copy link
Member

@kshyju kshyju left a comment

Choose a reason for hiding this comment

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

Few questions to understand the implementation better. Thanks!

release_notes.md Outdated Show resolved Hide resolved
Copy link
Member

@satvu satvu left a comment

Choose a reason for hiding this comment

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

lgtm!

@liliankasem liliankasem merged commit 91e0d11 into dev Aug 15, 2022
@liliankasem liliankasem deleted the liliankasem/outofproc-cancellation-token branch August 15, 2022 18:20
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.

Provide out-of-proc support for cancellation tokens
5 participants