-
Notifications
You must be signed in to change notification settings - Fork 768
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
Core Scheduler Logic Port to HSM framework #6140
base: main
Are you sure you want to change the base?
Conversation
…port # Conflicts: # components/scheduler/executors.go
…port # Conflicts: # components/scheduler/executors.go
…port # Conflicts: # api/enums/v1/common.pb.go # components/scheduler/executors_test.go # components/scheduler/tasks.go
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 didn't review the entire PR but there's some significant restructuring you should do before proceeding.
I'll also want @dnr to approve before we merge this.
…o scheduler-port # Conflicts: # components/scheduler/statemachine.go
Co-authored-by: Roey Berman <[email protected]>
Co-authored-by: Roey Berman <[email protected]>
return err | ||
} | ||
// Copy outside scheduler, which has been updated, to the state machine | ||
*sPtr = s |
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.
What if there's concurrent access to this machine? You'll lose that progress.
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 env not check this automatically?
Either way, I added a simple check for whether the state has changed since last updated. We should probably chat about whether this is something we want to build into the framework instead of relying on users .
components/scheduler/executors.go
Outdated
tag.NewAnyTag("overlap-policy", overlapPolicy), tag.NewBoolTag("manual", manual)) | ||
tweakables := e.config.Tweakables() | ||
|
||
if s.cspec == nil { |
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.
You assign the spec or error out so it should never reach this point without a valid spec.
What changed?
Building on #6065, this PR introduces the bulk of scheduler logic to the HSM-based prototype. This makes the prototype able to correctly start workflows according to a schedule, but does not yet port the original long-polling logic. The plan is to replace long-polling with HSM-based callbacks in the subsequent PR. HSM also makes most of the side-effects or activities based logic in the original scheduler obsolete.
Why?
#6065
How did you test it?
Unit tests & Functional Tests
Potential risks
#6065
Documentation
None
Is hotfix candidate?
No