Skip to content

Commit 12677f2

Browse files
authored
Merge pull request #8492 from cicoyle/fix-wf-running
Fix workflow engine starting when actor runtime is disabled
2 parents 9aaf397 + 2fb3abe commit 12677f2

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

pkg/runtime/wfengine/wfengine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"github.com/dapr/dapr/pkg/actors"
2727
"github.com/dapr/dapr/pkg/actors/targets/workflow"
2828
"github.com/dapr/dapr/pkg/config"
29-
runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
3029
"github.com/dapr/dapr/pkg/resiliency"
3130
"github.com/dapr/dapr/pkg/runtime/processor"
3231
backendactors "github.com/dapr/dapr/pkg/runtime/wfengine/backends/actors"
@@ -146,7 +145,8 @@ func (wfe *engine) RegisterGrpcServer(server *grpc.Server) {
146145
}
147146

148147
func (wfe *engine) Run(ctx context.Context) error {
149-
if wfe.actors.RuntimeStatus().GetRuntimeStatus() == runtimev1pb.ActorRuntime_DISABLED {
148+
_, err := wfe.actors.Engine(ctx)
149+
if err != nil {
150150
<-ctx.Done()
151151
return ctx.Err()
152152
}

tests/integration/suite/daprd/resources/dapr.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/dapr/dapr/tests/integration/framework/process/daprd"
2222
"github.com/dapr/dapr/tests/integration/framework/process/exec"
2323
"github.com/dapr/dapr/tests/integration/framework/process/logline"
24+
"github.com/dapr/dapr/tests/integration/framework/process/placement"
2425
"github.com/dapr/dapr/tests/integration/suite"
2526
)
2627

@@ -31,6 +32,7 @@ func init() {
3132
// dapr ensures that a component with the name `dapr` can be loaded.
3233
type dapr struct {
3334
daprd *daprd.Daprd
35+
place *placement.Placement
3436
logline *logline.LogLine
3537
}
3638

@@ -42,8 +44,13 @@ func (d *dapr) Setup(t *testing.T) []framework.Option {
4244
),
4345
)
4446

45-
d.daprd = daprd.New(t, daprd.WithResourceFiles(
46-
`apiVersion: dapr.io/v1alpha1
47+
d.place = placement.New(t)
48+
49+
d.daprd = daprd.New(t,
50+
daprd.WithPlacementAddresses(d.place.Address()),
51+
daprd.WithInMemoryActorStateStore("mystore"),
52+
daprd.WithResourceFiles(
53+
`apiVersion: dapr.io/v1alpha1
4754
kind: Component
4855
metadata:
4956
name: dapr
@@ -56,10 +63,13 @@ spec:
5663
),
5764
)
5865
return []framework.Option{
59-
framework.WithProcesses(d.logline, d.daprd),
66+
framework.WithProcesses(d.logline, d.place, d.daprd),
6067
}
6168
}
6269

6370
func (d *dapr) Run(t *testing.T, ctx context.Context) {
71+
d.place.WaitUntilRunning(t, ctx)
72+
d.daprd.WaitUntilRunning(t, ctx)
73+
6474
d.logline.EventuallyFoundAll(t)
6575
}

0 commit comments

Comments
 (0)