-
Notifications
You must be signed in to change notification settings - Fork 1.3k
gp timeout set allows >24 hour timeout (and < 1s) #16085
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
Comments
Just want to add that the total time of a workspace session (i.e. instance) currently is defined at 24 hours. Meaning that if the workspace ran for 2 hours, a 24h timeout should not be possible. |
quick-go (before this month's changelog release): We could add the limit b/w 5m (current: 1m) & 1440m (24 hours). Else, it would return an error. Future: We could decouple the server limit & adding support to this (#9038 (comment)) & allow users to set to >1440m |
@atduarte is there anyway for a user to know how long is remaining? Or, when the workspace was created to get an understanding for how long is remaining on the timeout? I would like to update this documentation PR. |
@loujaybee @atduarte Should I send out a small PR to limit this from Gitpod CLI side? to avoid misuse (before changelog release) |
Yes, please. We are adding this constraint to the other clients, also: |
@loujaybee cc @Siddhant-K-code the JetBrains PR, #16267, should fix these issues and add the 24 hour hard limit: |
Suggestion: With an Invalid message, can we specify the next action item to the user? Invalid timeout value: 0m. Timeout limit should be between 5m to 24h |
Looks good, I think that can be helpful. Do we have ideas for a sensible minimum workspace timeout? Currently, it's 1 minute. Maybe no need to change that, although extremely low. |
Updated the CLI command with the maximum boundary: gitpod /workspace/gitpod/components/gitpod-cli (filiptronicek/jetbrains-plugin-16107) $ go run . timeout set -h
Set timeout of current workspace.
Duration must be in the format of <n>m (minutes), <n>h (hours) and cannot be longer than 24 hours.
For example, 30m, 1h, 5h, etc.
Usage:
gp timeout set <duration> [flags]
Examples:
gitpod timeout set 1h
Flags:
-h, --help help for set |
@loujaybee or @atduarte might have some thoughts as they are also involved with this similar PR for docs (https://github.com/gitpod-io/website/pull/3341#discussion_r1101312402) |
Will close this issue as it's now partially completed. The command no longer allows more than 24hour timeouts, however the error output exposes unneeded implementation details around grpc:
|
Uh oh!
There was an error while loading. Please reload this page.
The docs for
gp timeout set
[1] states that the workspace timeout cannot be set to exceed 24 hours "maximum workspace timeout is 24 hours", however currentgp timeout set
allows for higher values than 24 hours to be entered.gp timeout set
returns an error message if value is set higher than 24hoursgp timeout set
allows to set an above 24 hours value without error.We should also set a sane upper and lower default: e.g. somewhere between 3 days to 1 week (requires discussion) which could potentially be overridden by contacting Gitpod directly, or in certain circumstances, however the current command allows you to set values into the 100's of years + (e.g.
gp timeout set 2000000h
=> success, which is 228 years). Also the current command allows you to set very low timeouts, e.g. < 1 minute, which can be done in error.The text was updated successfully, but these errors were encountered: