-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add scheduling configuration for prebuilds #408
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
15cae29
to
543a735
Compare
2f82387
to
d61894d
Compare
I really don't think we should call this "autoscaling" as that already has a specific meaning in Cloud circles which this is not. Autoscaling is adjusting instance counts dynamically based on measured load. This is adjusting instance counts based on a schedule. Some possible names:
|
I agree with @spikecurtis; autoscaling does indeed feel muddy in retrospect. |
return xerrors.Errorf("schedules overlap: %s and %s", | ||
schedules[i], schedules[j]) |
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.
This error message could be more helpful. We know which aspect of the schedules overlap, so let's help template authors out by telling them.
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.
It means everything (minutes, hours and days) overlap.
|
||
// SchedulesOverlap checks if two schedules overlap by checking | ||
// days, months, and hours separately | ||
func SchedulesOverlap(schedule1, schedule2 string) (bool, error) { |
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.
This is excellent work @evgeniy-scherbina!
I really like how clean the code is, how complete the code-coverage, and how clear the intentions are.
Co-authored-by: Danny Kopping <dannykopping@gmail.com>
@spikecurtis I renamed everything to |
Co-authored-by: Danny Kopping <dannykopping@gmail.com>
Co-authored-by: Danny Kopping <dannykopping@gmail.com>
Relates to coder/internal#312
Needed for coder/coder#18126
Exposes an
autoscaling
field undercoder_workspace_preset
: