Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
evgeniy-scherbina merged 19 commits intomainfromprebuilds-autoscaling-mechanism
Jun 18, 2025

Conversation

evgeniy-scherbina
Copy link
Contributor

@evgeniy-scherbinaevgeniy-scherbina commentedMay 29, 2025
edited
Loading

Relates tocoder/internal#312
Needed forcoder/coder#18126

Exposes anautoscaling field undercoder_workspace_preset:

data "coder_workspace_preset" "us-nix" {  ...    prebuilds = {  instances = 0                  # default to 0 instances    scheduling {  timezone = "UTC"             # only a single timezone may be used for simplicity    # scale to 3 instances during the work week  schedule {    cron = "* 8-18 * * 1-5"    # from 8AM-6:59PM, Mon-Fri, UTC    instances = 3              # scale to 3 instances  }    # scale to 1 instance on Saturdays for urgent support queries  schedule {    cron = "* 8-14 * * 6"      # from 8AM-2:59PM, Sat, UTC    instances = 1              # scale to 1 instance  }  }  }}

@evgeniy-scherbinaevgeniy-scherbinaforce-pushed theprebuilds-autoscaling-mechanism branch from15cae29 to543a735CompareJune 11, 2025 17:35
@spikecurtis
Copy link
Contributor

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:

  • Scale sceduling
  • Schedule-scaling
  • Pool scheduling
  • Prebuild scheduling
johnstcn reacted with thumbs up emoji

@dannykopping
Copy link
Contributor

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:

  • Scale sceduling
  • Schedule-scaling
  • Pool scheduling
  • Prebuild scheduling

I agree with@spikecurtis; autoscaling does indeed feel muddy in retrospect.
I'll offerscheduling as a another alternative.

Comment on lines +19 to +20
returnxerrors.Errorf("schedules overlap: %s and %s",
schedules[i],schedules[j])
Copy link
Contributor

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.

Copy link
ContributorAuthor

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
funcSchedulesOverlap(schedule1,schedule2string) (bool,error) {
Copy link
Contributor

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.

evgeniy-scherbina reacted with hooray emojievgeniy-scherbina reacted with rocket emoji
@evgeniy-scherbinaevgeniy-scherbina changed the titlefeat: add autoscaling configuration for prebuildsfeat: add scheduling configuration for prebuildsJun 18, 2025
@evgeniy-scherbina
Copy link
ContributorAuthor

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:

  • Scale sceduling
  • Schedule-scaling
  • Pool scheduling
  • Prebuild scheduling

@spikecurtis I renamed everything toscheduling

@evgeniy-scherbinaevgeniy-scherbina merged commit6570400 intomainJun 18, 2025
6 checks passed
@evgeniy-scherbinaevgeniy-scherbina deleted the prebuilds-autoscaling-mechanism branchJune 18, 2025 20:34
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 18, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn left review comments

@dannykoppingdannykoppingdannykopping approved these changes

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@evgeniy-scherbina@spikecurtis@dannykopping@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp