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

Throw better exceptions when invalid actor interfaces are used. #1148

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

philliphoff
Copy link
Collaborator

Description

Verifies that actor interfaces used to create actor proxies actually:

  • Inherit from IActor
  • Are publicly-visible

When interfaces are used that do not meet those requirements, a less cryptic error message is generated.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #859

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@philliphoff philliphoff requested review from a team as code owners September 21, 2023 22:21
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (10ef818) 66.53% compared to head (fb016d0) 66.52%.

Files Patch % Lines
src/Dapr.Actors/Client/ActorProxyFactory.cs 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1148      +/-   ##
==========================================
- Coverage   66.53%   66.52%   -0.02%     
==========================================
  Files         171      171              
  Lines        5752     5756       +4     
  Branches      626      628       +2     
==========================================
+ Hits         3827     3829       +2     
- Misses       1776     1777       +1     
- Partials      149      150       +1     
Flag Coverage Δ
net6 66.51% <50.00%> (-0.02%) ⬇️
net7 66.51% <50.00%> (-0.02%) ⬇️
net8 66.51% <50.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -14,6 +14,7 @@
namespace Dapr.Actors.Client
{
using System;
using System.Globalization;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're here, do you mind moving these imports outside of the namespace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure!

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.

Cryptic TypeLoadException if actor proxy interface is non-public
3 participants