Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CLI auto-stop extension #1461

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

Closed
Tracked by #1317
greyscaled opened this issue May 14, 2022 · 7 comments
Closed
Tracked by #1317

CLI auto-stop extension #1461

greyscaled opened this issue May 14, 2022 · 7 comments
Assignees
Labels
api Area: HTTP API cli Area: CLI
Milestone

Comments

@greyscaled
Copy link
Contributor

greyscaled commented May 14, 2022

User Story 👥

As a user with a workspace that has a ttl, I'd like to use the CLI to extend my lease.

Details

There are two types of extension scenarios: reactive and pre-emptive. Underneath the hood,
these are effectively the same and can be re-worded as: "I may extend well before shutdown, or as a CTA
when my lease is almost up (example via notification)".

Reactive Extension in a CLI-only approach

When we notify users that their workspace is shutting down (ie: #1414 ), we might give instructions or a
CTA.

Pre-emptive Extension ina CLI-only approach

We may expose an extension command that looks something like:

coder extend <workspace-name> [time]

If [time] is not supplied, we default to 90 mins. [time] may optionally be specified. We should set
an upper bound on [time]. TBD what that upper bound is, but at least two approaches are:

  1. A hard-set upper bound (example 24 hours)
  2. The difference between NOW and the next scheduled start time

Acceptance Criteria

  • A CLI command that extends a lease
@greyscaled
Copy link
Contributor Author

Left desc blank on purpose - want to double-check we still want pre-emptive extension for CE. Even if we don't, we still need reactive extension. The difference between the two can be further decomposed.

Currently at the SDK level we just have the ability to PUT the schedules:

coder/coderd/coderd.go

Lines 313 to 315 in 7bb7c6c

r.Route("/autostop", func(r chi.Router) {
r.Put("/", api.putWorkspaceAutostop)
})

@greyscaled
Copy link
Contributor Author

Please add your planning poker estimate with ZenHub @johnstcn

@greyscaled
Copy link
Contributor Author

@johnstcn I'll slot this one for next sprint so that it can land in grooming this week. This gives us some time to tackle other stories and then co-focus on extension in that sprint.

@johnstcn
Copy link
Member

johnstcn commented May 26, 2022

I'm going to call the CLI command coder bump <workspace> <duration> for now. It's short, sweet, and seems to make intuitive sense.

bump

@johnstcn
Copy link
Member

#1828

@johnstcn
Copy link
Member

Closed by #1828

@nadzeyav
Copy link

nadzeyav commented Jun 7, 2022

Verified in Coder v0.0.0-devel+af401e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API cli Area: CLI
Projects
None yet
Development

No branches or pull requests

4 participants