- Notifications
You must be signed in to change notification settings - Fork923
docs: add documentation for prebuild scheduling feature#18462
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
21c9c1a
tob92ae48
Compareb92ae48
tod26f663
CompareThere 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.
Fantastic documentation!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Danny Kopping <danny@coder.com>
Co-authored-by: Danny Kopping <danny@coder.com>
Co-authored-by: Danny Kopping <danny@coder.com>
Co-authored-by: Atif Ali <atif@coder.com>
Co-authored-by: Atif Ali <atif@coder.com>
8e3022e
intomainUh oh!
There was an error while loading.Please reload this page.
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 🚀 just some small nits
instances = 0 # default to 0 instances | ||
scheduling { | ||
timezone = "UTC" # only a single timezone may be used for simplicity |
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.
nit: add the list of supported timezones
**How scheduling works:** | ||
1. The reconciliation loop evaluates all active schedules every reconciliation interval (`CODER_WORKSPACE_PREBUILDS_RECONCILIATION_INTERVAL`). | ||
2. The schedule that matches the current time becomes active. Overlapping schedules are disallowed by validation rules. |
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.
small nit:
2. The schedulethat matchesthe current timebecomesactive. Overlapping schedules aredisallowed by validation rules. | |
2. The schedulematchingthe current timeis consideredactive. Overlapping schedules areprevented by validation rules. |
1. The reconciliation loop evaluates all active schedules every reconciliation interval (`CODER_WORKSPACE_PREBUILDS_RECONCILIATION_INTERVAL`). | ||
2. The schedule that matches the current time becomes active. Overlapping schedules are disallowed by validation rules. | ||
3. If no schedules match the current time, the base `instances` count is used. |
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.
small nit:
3. If noschedules match the current time, the base`instances` count is used. | |
3. If noschedule matches the current time, thesystem defaults to thebase`instances` count. |
Cron expressions follow the format: `* HOUR DOM MONTH DAY-OF-WEEK` | ||
- `*` (minute): Must always be `*` to ensure the schedule covers entire hours rather than specific minute intervals | ||
- `HOUR`: 0-23, range (e.g., 8-18 for 8AM-6:59PM), or `*` |
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.
Maybe use the same time interval for consistency:
-`HOUR`:0-23, range (e.g., 8-18 for 8AM-6:59PM), or`*` | |
-`HOUR`:8-18, range (e.g., 8-18 for 8AM-6:59PM), or`*` |
instances = 10 | ||
} | ||
schedule { | ||
cron = "* 19-23,0-7 * * 1,5" # Evenings and nights (7PM-11:59PM, 12AM-7:59AM, Mon-Fri) |
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.
Wow, it is possible to compose multiple hour intervals? Nice 🤩
Uh oh!
There was an error while loading.Please reload this page.
Follow-up to#18126
Changes: