Skip to content

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented May 26, 2022

  • Adds deadline column to workspace_builds, associated DB/API plumbing
  • database: Upon inserting a row into workspace_builds, deadline will be initially be zero.
  • autobuild: Executor will now check the Deadline field of the workspace_build for the purpose of autostop logic.
  • coderd: Adds a new route /api/v2/workspaces/:workspace/extend which will allow updating the deadline of the currently active workspace build. The new deadline must be after the existing deadline, and not the zero time.
  • provisionerd: update workspace_build.deadline upon successful workspace build completion (equal to now plus workspace TTL, if it exists)

Closes #1462

@johnstcn johnstcn requested a review from a team May 26, 2022 12:55
@johnstcn johnstcn requested a review from a team as a code owner May 26, 2022 12:55
@johnstcn johnstcn self-assigned this May 26, 2022
@johnstcn johnstcn requested a review from greyscaled May 26, 2022 12:55
Copy link
Member

@deansheather deansheather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what will be the behavior when the user changes the TTL on a running workspace? Will you add functionality to the CLI so we also update the TTL to be closer to the new TTL?

@johnstcn
Copy link
Member Author

johnstcn commented May 26, 2022

So what will be the behavior when the user changes the TTL on a running workspace? Will you add functionality to the CLI so we also update the TTL to be closer to the new TTL?

Good idea!

EDIT: Opened separate issue as this has a lot of if's and but's #1783

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments

@johnstcn johnstcn force-pushed the cj/autostop-extend-api branch from ded669b to 03ec987 Compare May 26, 2022 16:48
@johnstcn johnstcn merged commit 8f0a5a8 into main May 26, 2022
@johnstcn johnstcn deleted the cj/autostop-extend-api branch May 26, 2022 17:08
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
* Adds deadline column to workspace_builds, associated DB/API plumbing
* database: Upon inserting a row into workspace_builds, deadline will 
  initially be zero.
* autobuild: Executor now checks the Deadline field of the workspace_build
  for the purpose of autostop logic.
* coderd: Adds a new route /api/v2/workspaces/:workspace/extend which allows
  updating the deadline of the currently active workspace build. The new
  deadline must be after the existing deadline, and not the zero time.
* provisionerd: updates workspace_build.deadline upon successful workspace 
  build completion (equal to now plus workspace TTL, if it exists).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API/SDK auto-stop extension
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy