-
Notifications
You must be signed in to change notification settings - Fork 979
feat: add template max_ttl #6114
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
Changes from 1 commit
5509824
4c6a501
7892c5a
9e37cc7
ad64806
96fd840
bc39570
4e1d948
69035a6
ce7ec39
89ccfc8
feb7b3c
d54d798
6caeb00
49a2ec7
e28e32e
651149b
25f7d2c
e3d8557
f62ba67
2b029d8
e60919e
ef3bebf
351b708
847bc4c
0611794
e44f589
6bb65ac
a972c57
3ce2bc3
4beff52
5e97e96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I'm wondering why isTemplateScheduleStore
an interface. I see only one implementation here:agplTemplateScheduleStore
. Is it for testing purposes?Ok, I see now, there is one for enterprise too.
WDYT about renaming stores to be more descriptive instead of
agpl...
andenterprise...
. If we decide to introduce another pricing plan, then we will need to rename them accordingly :) I would move these implementations to a seperate package, maybeschedule
orscheduling
?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.
We currently have a
schedule
package but it's underautobuild/schedule
, whereas this package doesn't pertain to autostart at all, only autostop...Maybe I should move the existing
schedule
package tocoderd/schedule
and then copy this code to it instead?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 done, I've moved
coderd/autobuild/schedule
tocoderd/schedule
and added the code from this file.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 not entirely what I meant. Currently, the
agpl...
andenterprise...
logic are scattered. The idea is place them in the same package, but rename accordingly. These are just different strategies, so it's perfectly fine to keep them together.For instance,
agplTemplateScheduleStore
->userControlledTemplateScheduleStore
,enterpriseTemplateScheduleStore
->maxTTLTemplateScheduleStore
.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.
We cannot place them in the same package as AGPL code can't be mixed with enterprise code, and there needs to be an implementation outside of AGPL otherwise AGPL-compiled binaries wouldn't be able to compile properly.
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.
I can change the names of them but I feel the names you propose are too specific especially if we add other features to them in the future.
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.
I see, that's unfortunate. Let's leave as is.
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 the same pattern we use for other enterprise features that hide behind interfaces btw