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

Register IPlatformInformationService in AddDurableClientFactory() #1727

Merged
merged 5 commits into from
Mar 13, 2021

Conversation

bachuv
Copy link
Collaborator

@bachuv bachuv commented Mar 12, 2021

These changes incorporate the changes from #1706 and register IPlatformInformationService in AddDurableClientFactory(). Without registering IPlatformInformationService , creating a DurableClient with Azure Storage fails because it can't find an implementation of IPlatformInformationService in AzureStorageDurabilityProviderFactory. This PR also includes a test in DurableClientBaseTests to help us catch if any new services need to be registered in AddDurableClientFactory() in the future.

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)

@bachuv bachuv added this to the v2.4.2 milestone Mar 12, 2021
@bachuv bachuv self-assigned this Mar 12, 2021
Copy link
Contributor

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for cleaning up my post-merge mess 😄 !
Left a non-blocking comment

test/FunctionsV2/PlatformSpecificHelpers.FunctionsV2.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@ConnorMcMahon ConnorMcMahon left a comment

Choose a reason for hiding this comment

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

Approved with suggestions.

test/Common/DurableClientBaseTests.cs Outdated Show resolved Hide resolved
test/Common/DurableClientBaseTests.cs Outdated Show resolved Hide resolved
public async Task DurableClient_AzureStorage_SuccessfulSetup()
{
string orchestratorName = nameof(TestOrchestrations.SayHelloInline);
using (ITestHost host = TestHelpers.GetJobHost(
Copy link
Contributor

Choose a reason for hiding this comment

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

In the long run, we may be able to simplify this test (and the additional helper methods we added) by making a generic .NET Core host that calls builder.Services.AddDurableClientFactory();. That is more inline with what end customers would be doing, and then you don't need all of the changes to TestHelpers to accommodate wiring this into the JobHost.

In the interest of time and the code freeze today, I am fine postponing this.

test/Common/DurableClientBaseTests.cs Outdated Show resolved Hide resolved
test/FunctionsV2/PlatformSpecificHelpers.FunctionsV2.cs Outdated Show resolved Hide resolved
test/Common/TestHelpers.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@amdeel amdeel left a comment

Choose a reason for hiding this comment

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

Looks great!

@bachuv bachuv merged commit e17afcc into dev Mar 13, 2021
@bachuv bachuv deleted the vabachu/durableclientplatformservicefix branch March 13, 2021 01: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.

4 participants