-
Notifications
You must be signed in to change notification settings - Fork 207
Fix workflow resource path lookup #1564
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
Conversation
In standalone mode, if the resource path is not explicitly defined in the daprd process arguments, the workflow engine fails to locate the resource files, used to fetch the actor state store component manifest. This change updates the resource path lookup logic to use the default component path when the resource path is not defined. Signed-off-by: joshvanl <me@joshvanl.dev>
6165396 to
f26a4c0
Compare
acroca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add tests for this?
| import "github.com/spf13/cobra" | ||
|
|
||
| var ( | ||
| daprRuntimePath string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, you moved this to its own package so it's reusable from both pkg/workflow and cmd packages without introducing a circular dependency, right?
Why not keep it as it was (in the dapr.go) and pass it as an argument when calling functions in the pkg/workflow like it's done for the other options like the kubernetes mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/workflow is called from the cmd/workflow sub command sub package commands. cmd imports cmd/workflow to register the workflow sub commands.
We either need to have the flag registered and available from a third shared package, or register it multiple times for everywhere it is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 right, I missed that sorry
In standalone mode, if the resource path is not explicitly defined in the daprd process arguments, the workflow engine fails to locate the resource files, used to fetch the actor state store component manifest. This change updates the resource path lookup logic to use the default component path when the resource path is not defined.