-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add activity status and autostop reason to workspace overview #11987
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
Conversation
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
e68fbc6
to
cdc0ea2
Compare
(seriously, where does |
BrunoQuaresma
approved these changes
Feb 8, 2024
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.
coadler
reviewed
Feb 12, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #11710
Closes #11694
Closes #12064
deadline
has come from (either template settings or workspace settings)How deadline bumping works, for posterity
database.ActivityBumpWorkspace
implementation, which is the function called fromagentapi.ActivityBumpWorkspace
whenstats.ConnectionCount > 0
, and which also callsdatabase.UpdateWorkspaceLastUsedAt
Whenever the agent reports to the backend with an active connection we set the
"workspaces"."last_used_at"
column tonow()
and the"workspace_builds"."deadline"
column tonow() + "1 hour"::interval
, if it is not already at least 1 hour away, or to"workspace_builds"."max_deadline"
if that would be sooner. I still don't get wheremax_deadline
comes from.So basically, the deadline will decrease continuously until it gets to less than 1 hour, at which point it will essentially stay pinned at 1 hour as long as a connection remains active, or until the max deadline is less than an hour away.
Options for communicating this
deadline
while there is an active connection untildeadline == max_deadline
deadline
to sneak right up to themax_deadline
without quite hitting it, and then the workspace just shuts offdeadline
is already close to themax_deadline
, and a user connects, they might go check the dashboard, see that it says "your activity is keeping your workspace alive", and then be caught off guard when it disconnects an hour and a half later.deadline
is within a few hours ofmax_deadline
?max_deadline
while there is an active connection"this workspace will stop at {max_deadline} regardless of active connections"
I guess?Update: We've decided to go with a variation on the first one: only show the warning while there is activity if the
max_deadline
is within two hours. This will supplemented by notifications from the VSCode and JetBrains extensions in the future.