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

Skip to content

Template-enforced autostop can be overridden in the UI #13078

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
stirby opened this issue Apr 25, 2024 · 2 comments · Fixed by #13182
Closed

Template-enforced autostop can be overridden in the UI #13078

stirby opened this issue Apr 25, 2024 · 2 comments · Fixed by #13182
Assignees
Labels
s2 Broken use cases or features (with a workaround). Only humans may set this. site Area: frontend dashboard

Comments

@stirby
Copy link
Collaborator

stirby commented Apr 25, 2024

Users can override the default template Autostop in the UI even if it's prevented in the template settings.

autostop_enforcement

stop_in_13_hours

Tested with both admin and user roles, though I'm not sure if it can be modified via CLI/API from the user.

Effectively makes the "enforce changes..." option obsolete.


Two options for fixing this:

We can disable [+] and leave [-] enabled, since we don't want to prevent users from reducing cloud spend.

Or we can hide the [-] [+] entirely for simplicity.

@stirby stirby added s2 Broken use cases or features (with a workaround). Only humans may set this. bug labels Apr 25, 2024
@coder-labeler coder-labeler bot added the site Area: frontend dashboard label Apr 25, 2024
@BrunoQuaresma
Copy link
Collaborator

BrunoQuaresma commented May 2, 2024

So what we want to do is, if the template enforces autostop, the user should never be able to stop it. Is that correct?

I would assume the autostop is just a default value since the user could just start the workspace again after the workspace is stopped anyway 🤔 but if you are sure about this is what we want to have I'm ok 👍

@stirby
Copy link
Collaborator Author

stirby commented May 3, 2024

So what we want to do is, if the template enforces autostop, the user should never be able to stop it. Is that correct?

Specifically, the user should not be able to extend autostop. While they can still restart their workspace to reset the timer, admins are frustrated with the user's ability to extend the timer for convenience.

The ability to modify the autostop timer is disabled in the workspace settings when the template "enforces" the setting, we should also disable it here.

@BrunoQuaresma BrunoQuaresma self-assigned this May 3, 2024
DanielleMaywood added a commit that referenced this issue Dec 18, 2024
Fixes #15515

This change effectively reverts the changes introduced by
#13182 (for
#13078).

We also rename the `override-stop` command name to `extend` to match the
API endpoint's name (keeping an alias to allow `override-stop` to be used).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2 Broken use cases or features (with a workaround). Only humans may set this. site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants