Skip to content

Bump stop time even when start time occurs even if there's no activity #12864

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
mattlqx opened this issue Apr 4, 2024 · 3 comments · Fixed by #13115
Closed

Bump stop time even when start time occurs even if there's no activity #12864

mattlqx opened this issue Apr 4, 2024 · 3 comments · Fixed by #13115
Assignees
Labels
s3 Bugs that confuse, annoy, or are purely cosmetic

Comments

@mattlqx
Copy link

mattlqx commented Apr 4, 2024

It doesn't appear 290180b addressed the issue completely for us.

I have this example occur:

  • user has workspace with auto-start at 9:00am, 12 hour auto-stop.
  • coder stops workspace at 9:00pm.
  • user starts workspace at 9:45pm.
  • coder does not action on workspace auto-start at 9:00am.
  • coder stops workspace at 9:45am.
  • user returns mid-day to find workspace he thought would be running wasn't.

Is it possible to make the auto-stop interval bump at auto-start time regardless of activity? I'd prefer consistency in user expectations over wasting some dollars in the cases where on-call engineers need to start their workspaces out of their usual window.

@stirby
Copy link
Collaborator

stirby commented Apr 19, 2024

@sreya we fixed this previously, could be a regression.

Original issue: #2028

@johnstcn johnstcn added s3 Bugs that confuse, annoy, or are purely cosmetic bug and removed feature labels Apr 19, 2024
@mtojek mtojek assigned f0ssel and unassigned johnstcn Apr 19, 2024
@Kira-Pilot Kira-Pilot assigned Emyrk and unassigned f0ssel Apr 29, 2024
@Emyrk
Copy link
Member

Emyrk commented Apr 30, 2024

@stirby we did not fix this issue because the current behavior requires activity. The issue posted is to extend the auto-stop in the case there is no activity.

Said differently, the current solution to this problem is implemented in activityBumpWorkspace. If no activity happens, the extension is not applied. I will take a look if we can put this elsewhere, or in two places.

@Emyrk
Copy link
Member

Emyrk commented Apr 30, 2024

After talking with @johnstcn, I am going to fix this upfront on the deadline calculation.

func CalculateAutostop(ctx context.Context, params CalculateAutostopParams) (AutostopTime, error) {

So when this situation occurs, the deadline will be 23.75hrs after the initial workspace start.

  1. User has workspace with auto-start at 9:00am, 12 hour auto-stop.
  2. Coder stops workspace at 9pm
  3. user starts workspace at 9:45pm.
  • The initial deadline is calculated to be 9:45am
  • This crosses the autostart deadline, so the deadline is extended to 9pm

I will come up with some docs to document this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s3 Bugs that confuse, annoy, or are purely cosmetic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants