Comments (9)
. Specifically, this internal actor code should check for an error result indicating that the workflow wasn't found and then return a nil response rather than an error response.
Alternatively, we could update durabletask-go to export and check for a well-known ErrInstanceNotFound error, and then have the Dapr runtime return this value instead of nil if we determine that a queried workflow doesn't exist.
@cgillum Of the two, I'd vote for the first option, returning nil
instead of an error. IMO, "non existence" isn't (necessarily) an error. Or rather, whether it's an error or not should be determined by the calling application and not the object store. Returning an error value, even a very specific "not found" value, will tend to get treated as a generic error on the other side of gRPC boundary. In the case of .NET, that will be an exception, which are tedious to handle as well as impact performance. (I wish the gRPC libraries had the option of treating invocations more more like raw HTTP invocations where the result could be observed before any action is taken.)
from dapr.
Transferred issue to the runtime repo.
cc @cgillum
from dapr.
As best I can tell, it looks like an issue with the workflow component in the Dapr runtime or the Durable Task Go SDK (where it doesn't treat "not found" as a non-error error, and just passes back the original error instead of nil
) which then gets passed up to the Durable Task SDK on top of which the Dapr .NET Workflow SDK are built. I'd file an issue in dapr/dapr.
from dapr.
Is the expectation that no gRPC error is observed or is the expectation that the gRPC error makes it easy to distinguish between "not found" and other errors, for example, by using appropriate status codes (NotFound
instead of Unknown
)?
from dapr.
well reviewing the existing implementation in the sdk it seems to me that they expect a null in c# and nil in go
from dapr.
My question was whether you the application developer have an expectation on the ideal behavior. But I assume based on the screenshots you shared that you're okay with the behavior that the SDKs were designed for.
Looking at the durabletask-go
code, it seems the gRPC API implementation is consistent with the SDKs, as shown here: https://github.com/microsoft/durabletask-go/blob/60e42f2bb25034de2b20201a3139f5fcc159200e/backend/executor.go#L268-L278. In other words, it expects a nil
response from the backend implementation (defined by Dapr in this case) to indicate that an instance doesn't exist, in which case it will return a "doesn't exist" response to the gRPC client, which the SDKs are designed to handle gracefully.
I think the simplest way to fix this is to update the Dapr runtime code here:
dapr/pkg/runtime/wfengine/backends/actors/backend.go
Lines 224 to 230 in d4f06c2
nil
response rather than an error response.
Alternatively, we could update durabletask-go
to export and check for a well-known ErrInstanceNotFound
error, and then have the Dapr runtime return this value instead of nil
if we determine that a queried workflow doesn't exist.
from dapr.
+1
from dapr.
If correct, that's fine with me
from dapr.
any update guys??
from dapr.
Related Issues (20)
- [Proposal] Chained token credentials for component authentication
- Dapr v1.11 runtime service invocation adds a default content type in dotnet sdk HOT 1
- v1.14 Endgame HOT 2
- runAsNonRoot issues in helm charts HOT 1
- Is it possible to fetch application metrics and expose in Dapr prometheus endpoint?
- dapr in k8s use command ‘ dapr status -k ’ report Unauthorized
- issue webhook "sidecar-injector.dapr.io" sentry SignCertificate HOT 3
- [Proposal] New Building Block: Centralized Cache Store HOT 2
- Enable OpenSSF Scorecard to enhance security practices across the project
- Add actor reminder support for Cron expressions HOT 7
- Exception thrown during Job schedule API call HOT 2
- rabbitmq component, cannot enable deletedWhenUnused and enableDeadLetter at the same time
- Scheduler Helm Chart not respecting HA replicas HOT 1
- [Feature] Add workfllow reminder support for Cron expressions HOT 4
- Dapr side car injector is not working in AKS
- Workflow & APP_API_TOKEN HOT 1
- Support auto-scale of distributed scheduler HOT 5
- Improve observability of Dapr apps with Side-Eye -- a debugger and dynamic observability tool for distributed systems HOT 2
- Add support for tracing in PubSub for non-cloud events for PubSub providers which support headers
- Schedule API stopped working after runtime 1.14 rc.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dapr.