-
Notifications
You must be signed in to change notification settings - Fork 881
fix: coderd: decouple ttl and deadline #2282
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a19a0e9
fix: coderd: decouple ttl and deadline
johnstcn 3999661
yarn lint
johnstcn f5ce8a3
update storybook
johnstcn 987f785
fmt
johnstcn cd4dce3
fix ttl command
johnstcn 91e3171
drive-by: default ttl to min(12 hours, template max) for new workspaces
johnstcn 00ac2a2
fix: WorkspaceSchedule: show tz of schedule if available, default to …
johnstcn 3faf3c8
cli: list: measure extension from provisioner job completed_at
johnstcn a763d2f
WorkspaceScheduleForm: fix "a few seconds after start"
johnstcn bbd8288
address PR comments
johnstcn feef823
Merge remote-tracking branch 'origin/main' into cj/2229/decouple-ws-d…
johnstcn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package cli | ||
|
||
const ( | ||
timeFormat = "3:04:05 PM MST" | ||
dateFormat = "Jan 2, 2006" | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,11 +85,9 @@ func (e *Executor) runOnce(t time.Time) Stats { | |
// is what we compare against when performing autostop operations, rounded down | ||
// to the minute. | ||
// | ||
// NOTE: Currently, if a workspace build is created with a given TTL and then | ||
// the user either changes or unsets the TTL, the deadline for the workspace | ||
// build will not have changed. So, autostop will still happen at the | ||
// original TTL value from when the workspace build was created. | ||
// Whether this is expected behavior from a user's perspective is not yet known. | ||
// NOTE: If a workspace build is created with a given TTL and then the user either | ||
// changes or unsets the TTL, the deadline for the workspace build will not | ||
// have changed. This behavior is as expected per #2229. | ||
Comment on lines
+88
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. review: this is now the expected behaviour until we're told otherwise! |
||
eligibleWorkspaces, err := db.GetWorkspacesAutostart(e.ctx) | ||
if err != nil { | ||
return xerrors.Errorf("get eligible workspaces for autostart or autostop: %w", err) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
review: this was causing us to measure deadline extensions incorrectly, resulting in things like
8h (+3m)
if your workspace took 3 minutes to buidl.