-
Notifications
You must be signed in to change notification settings - Fork 881
feat: allow templates to specify max_ttl or autostop_requirement #10920
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
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.
BE is good, just need to remove a line to make tests work
MaxTTL time.Duration `json:"max_ttl"` | ||
// UseMaxTTL dictates whether the max_ttl should be used instead of | ||
// autostop_requirement for this template. This is governed by the template | ||
// and licensing. | ||
// TODO(@dean): remove this when we remove max_tll |
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.
Do we still intend to remove max_ttl? Or remove this comment?
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.
Yes, it's deprecated
} | ||
enterpriseTemplateStore.UseAutostopRequirement.Store(true) | ||
|
||
quietHoursStore, err := schedule.NewEnterpriseUserQuietHoursScheduleStore(api.DefaultQuietHoursSchedule) | ||
if err != nil { | ||
api.Logger.Error(ctx, "unable to set up enterprise user quiet hours schedule store, template autostop requirements will not be applied to workspace builds", slog.Error(err)) |
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.
now that we have the Health page, it would be cool if we could elevate this kind of stuff to there.
@@ -121,6 +122,7 @@ export const FormSection: FC< | |||
> | |||
{title} | |||
{alpha && <AlphaBadge />} | |||
{deprecated && <DeprecatedBadge />} |
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.
Can you drop a screencap with what this looks like?
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.
max_ttl
andautostop_requirement
at the same time in deploymentsCRON_TZ=UTC 0 0 * * *
for quiet hours schedule (so it's always enabled if entitled, can be overridden with flag still)template_autostop_requirement
, merged intoadvanced_template_scheduling
TODO:
Create template form
chrome_8fiabxzSQz.mp4
Edit template form
chrome_UcH8t1ESW6.mp4
Closes #9284