-
Notifications
You must be signed in to change notification settings - Fork 346
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 analyzers that help prevent developer gotchas #1426
Comments
I'd be interested in looking at this; although partially motivated by self improvement as my knowledge of Roslyn analysers isn't super strong, but an area I'd like to improve. |
Planning to add an analyzer to make sure |
I didn't realize analyzers can look up installed packages. If that's the case, sounds like a great idea. Could take it a step farther, though a future release might render it obsolete. Because only the app that schedules a job can receive job invocations, you could do a scan for all the job names that are registered in the app and validate there's a corresponding mapped handler for each. |
Can we add an analyzer that checks the input and output argument types when calling activities from the workflow? And if the activity class name matches? See the DurableTaskAnalyzers. |
I added the former to the list. Can you get into more detail on the latter ask and how it differs from "Identify workflows and workflow activities that are referenced, but not registered in DI" which is already in the table? I'll go through the linked analyzers and get them added as well. Good find! |
Yes, the other use case matches what you describe here 👍 . |
Describe the feature
This is intended more as a parent issue to track progress for individual analyzers, but the goal is that we reduce some of the opportunities for developers to inadvertently misconfigure things that we might catch at build time and reduce runtime exceptions. Here's a short and evolving list of opportunities here:
UseHttpsRedirection
with actorsUseHttpsRedirection
middleware as this breaks Dapr actor discoveryMapActorsHandlers
is in app startupAddActors
is found, validate thatMapActorsHandlers
is in placeapp.UseX()
have it specified in Program.csMapSubscribeHandler
is in app startup when programmatic subscriptions are usedWithTopic
or aTopic
attribute), validate thatMapSubscribeHandler
is in place** - thanks to @ngruson for the ideaThere are a great many analyzers and code fix providers in the Azure Functions Durable Extension repository that could be adapted for use in Dapr Workflows as well.
Release Note
RELEASE NOTE: ADD Analyzers to help prevent runtime errors
The text was updated successfully, but these errors were encountered: