-
Notifications
You must be signed in to change notification settings - Fork 356
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
chore(actors): refactor pods.go without actors [DET-9901] #8170
Conversation
✅ Deploy Preview for determined-ui canceled.
|
2e1d454
to
d531854
Compare
d531854
to
06615db
Compare
@@ -615,13 +602,13 @@ func (p *pods) refreshPodStates(ctx *actor.Context, allocationID model.Allocatio | |||
continue | |||
} | |||
pod := pod | |||
p.podStatusCallback(ctx.Self().System(), watch.Event{Object: &pod}) | |||
p.podStatusCallback(system, watch.Event{Object: &pod}) |
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.
Would it be possible to completely remove actors from pods if we can resolve this? Maybe passing in a callback or interface to Initialize?
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 going to fix this when i do k8s resource pool. felt it would be easier then.
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.
at that point, i won't be able to ctx.Tell the cluster anyway, so it will have to happen.
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.
LGTM
Description
Change pods.go from an actor to a plain Go struct with locks and make all calls synchronous. The change is simple; most of the work is in making sure this causes no bugs like deadlocks or race conditions, and no performance issues due to lock contention.
Test Plan
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
Ticket
DET-9901