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

Make durable client registration idempotent. #2950

Merged
merged 4 commits into from
Nov 8, 2024
Merged

Conversation

jviau
Copy link
Contributor

@jviau jviau commented Oct 30, 2024

This PR addresses an issue where registering the durable worker extension twice would break the extension. The extension registration has now been made idempotent and safe to call multiple times. Additionally, durable extension registration has been made available in an extension method off IFunctionsWorkerApplicationBuilder to simplify cases where auto-registration via source gen is not available.

Issue describing the changes in this PR

resolves #2804

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
  • My changes do not add EventIds to our EventSource logs
    • Otherwise: Ensure the EventIds are within the supported range in our existing Windows infrastructure. You may validate this with a deployed app's telemetry. You may also extend the range by completing a PR such as this one.
  • My changes should be added to v3.x branch.
    • Otherwise: This change only applies to Durable Functions v2.x and will not be merged to branch v3.x.

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.

@jviau these changes look good to me. Can you comment on whether this has been tested? If so, I'd feel good about merging it.

@jviau
Copy link
Contributor Author

jviau commented Nov 8, 2024

@cgillum I have ran smoke tests and it succeeds. Also succeeds with a redundant call to ConfigureDurableExtension (added in this PR) to confirm it addresses the double-registration issue.

@cgillum cgillum merged commit aa30752 into dev Nov 8, 2024
14 checks passed
@cgillum cgillum deleted the jviau/idempotent-configure branch November 8, 2024 19:53
@MarcinJuraszek
Copy link

Has this been released in any version already?

@cgillum
Copy link
Member

cgillum commented Nov 18, 2024

@MarcinJuraszek yes, see the release notes here: https://github.com/Azure/azure-functions-durable-extension/releases/tag/v1.2.0-worker-extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants