-
Notifications
You must be signed in to change notification settings - Fork 24
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
Scheduler Longhaul Tests #238
Conversation
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
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.
Looks amazing @cicoyle ! I ran the local multi app run and it worked great. Before going into more detailed review of the apps I'll share a few notes so you can work on them in the meantime:
- We need to add the app's deplyment file, following this example: https://github.com/dapr/test-infra/blob/master/longhaul-test/hashtag-actor-deploy.yml
- We also need a new Github workflow file that will deploy the apps (example: https://github.com/cicoyle/test-infra/blob/feat-scheduler-longhaul/.github/workflows/hashtag-actor.yml). This should be triggered every time there are code changes in the app directory and (re)deploy your app in the cluster.
Also please doublecheck if we need to specify persistance for etcd, or are we using the default. I don't remember what we decided last.
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
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.
Submitting feedback for the scheduler jobs app. I'm checking the other two tomorrow.
log.Println("waiting a few seconds to let connections establish") | ||
time.Sleep(5 * time.Second) |
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.
Does the sdk provide a way to know this for certain? If not, we should probably think about adding one.
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.
Im uncertain. I think I added this bc in my testing locally I noticed a discrepancy where I thought some jobs got dropped if they were scheduled too quickly upon startup
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.
Adding review for the scheduler-workflow app.
Looking at actor reminders next
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Thanks for the review @elena-kolevska - I've updated the code accordingly :) Ready for your review again |
|
||
This tests the Scheduler for the underlying storage for Actor Reminders. | ||
|
||
## How To Run the Code: |
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.
I wasn't able to run the code, I keep getting the error:
== APP == dapr client initializing for: 127.0.0.1:65181
== APP == 2024/11/19 23:05:27 error starting health increase reminder: error invoking register actor reminder playerActorType/player-1: rpc error: code = PermissionDenied desc = operations on actor reminders are only possible on hosted actor types
DEBU[0001] api error: code = Internal desc = error invoke actor method: rpc error: code = Canceled desc = context canceled app_id=player-actor-client instance=Elenas-MacBook-Pro.local scope=dapr.runtime.grpc.api type=log ver=1.14.4
These are the commands I used:
dapr run --app-id player-actor --app-port 3007 --log-level debug --config ../dapr/config.yaml -- go run player-actor.go
and
dapr run --app-id player-actor-client --log-level debug --config ../dapr/config.yaml --placement-host-address=localhost:50007,localhost:50008,localhost:50009 -- go run player-actor-client.go
I tried running with 1.14.4 and latest builds from master.
What am I missing?
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.
I'm able to run it as-is using the instructions from my readme and do not see that error. Did you try the exact commands from my readme? Im also using v1.14.4
I have seen that error before- outside of the context of my PR here -in the wf scheduler e2e PR in CI, but am not able to repro the issue you are seeing and not familiar enough actors to know what the issue is off the top of my head.
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.
First, I would try the commands noted in the readme since thats exactly what I've tested and what works for me. If that doesn't work you you, then I would try leaving --placement-host-address
unset and see if that changes things. I noticed you are running placement in HA mode from your command.
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.
Yeah, I did run the original commands as they are in the read me, and I got this error:
== APP == 2024/11/20 17:25:02 error invoking actor method GetUser: error invoking binding playerActorType/player-1: rpc error: code = Internal desc = the state store is not configured to use the actor runtime. Have you set the - name: actorStateStore value: "true" in your state store component file?
Then I removed the --app-port 3008
argument for the client and got the error I shared above. Really weird. I'll look into it some more.
- appID: scheduler-actor-reminders-client | ||
appDirPath: ../../scheduler-actor-reminders/client | ||
appPort: 3008 |
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.
appPort: 3008 |
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.
ik its a client, but I think for the conn to work with dapr this is still needed.
- name: dapr | ||
containerPort: 3008 |
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.
- name: dapr | |
containerPort: 3008 |
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.
I think this is still needed for dapr to be able to comm with my app in k8s
Thanks for updating @cicoyle , I went through the deployment-related files in the meantime and they mostly look good. I corrected the things I saw, you can just accept the changes and we'll see if we got everything right when we try to deploy. The only thing that's left is verifying that the reminders app problem I ran into is just some config thing on my side. Does the program run for you right now? I tried it on the earlier version, before your commits from today. I'll look into your updates first thing tomorrow. |
Co-authored-by: Elena Kolevska <[email protected]> Signed-off-by: Cassie Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]>
Fun Scheduler Actor Reminders test that simulates a player session where the players health decays over time and then simulates them getting a health pack or the like where their health is increased periodically. Once the players health gets to 0, the player dies, the reminders (health decay reminder and health increase reminder) are unregistered and then the player is revived and the reminders are started again. Note the
SchedulerReminders
config is set.Workflow app that repeatedly starts, pauses, and resumes workflows. It defines a TestWorkflow that interacts with activities, handles external events, and logs the workflow's progress through stages. The app continuously monitoring and terminating workflows as necessary. Note the
SchedulerReminders
config is set.I added instructions for how to run locally.