feat: add scheduling configuration for prebuilds#408
feat: add scheduling configuration for prebuilds#408evgeniy-scherbina merged 19 commits intomainfrom
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.
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.
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.
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
autoscalingfield undercoder_workspace_preset: