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

Add and consume validation helpers, remove unused interface #65

Merged
merged 3 commits into from
Oct 18, 2022

Conversation

jviau
Copy link
Member

@jviau jviau commented Oct 14, 2022

Adds some validation helpers to simplify argument verification, leveraging the CallerArgumentExpressionAttribute. Also removes IDurableTaskRegistry as that is no longer used - the concrete options type in Worker.Core.csproj is used now.

@jviau jviau requested a review from cgillum October 14, 2022 21:55
@cgillum
Copy link
Member

cgillum commented Oct 14, 2022

Looks like there's a test failure:

[xUnit.net 00:00:01.15]     Microsoft.DurableTask.Worker.Tests.DefaultDurableTaskBuilderTests.BuildTarget_ValidType_Sets [FAIL]
  Failed Microsoft.DurableTask.Worker.Tests.DefaultDurableTaskBuilderTests.BuildTarget_ValidType_Sets [18 ms]
  Error Message:
   System.ArgumentNullException : Value cannot be null. (Parameter 'value')
  Stack Trace:
     at Microsoft.DurableTask.Check.NotNull[T](T argument, String name) in /home/runner/work/durabletask-dotnet/durabletask-dotnet/src/Shared/Validation/Check.cs:line 67
   at Microsoft.DurableTask.Check.ConcreteType[TImplements](Type argument, String name) in /home/runner/work/durabletask-dotnet/durabletask-dotnet/src/Shared/Validation/Check.cs:line 107
   at Microsoft.DurableTask.Worker.DefaultDurableTaskBuilder.set_BuildTarget(Type value) in /home/runner/work/durabletask-dotnet/durabletask-dotnet/src/Worker/Core/DependencyInjection/DefaultDurableTaskBuilder.cs:line [40](https://github.com/microsoft/durabletask-dotnet/actions/runs/3253189718/jobs/5340212656#step:7:41)
   at Microsoft.DurableTask.Worker.Tests.DefaultDurableTaskBuilderTests.BuildTarget_ValidType_Sets() in /home/runner/work/durabletask-dotnet/durabletask-dotnet/test/Worker/Core.Tests/DependencyInjection/DefaultDurableTaskBuilderTests.cs:line 28

@jviau jviau merged commit 1e5c950 into microsoft:main Oct 18, 2022
@jviau jviau deleted the arg-checks branch October 18, 2022 22:58
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