Skip to content
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

Workspace Timeout improvements (JetBrains) #16267

Merged
merged 6 commits into from
Feb 10, 2023

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Feb 7, 2023

PR progress

  • Think about adding a separate command for a quick pre-set value (basically the old Extend)

Description

This PR adds 5 workspace timeout-related features:

  • a dialog in JetBrains IDEs so that one can make the workspace timeout anything they desire

    image
  • humanReadableDuration as a parameter of SetWorkspaceTimeoutResult, so that clients can echo the server-interpreted time duration of the timeout extension.

    image

  • a hard limit of 24 hours for timeouts

  • better timeout validation: durations like 2H or 20M are now allowed, while values like 0xfd have been excluded

  • a prettier time output when setting a timeout with gp timeout set

    image

Related Issue(s)

Following #15815
Fixes #16107

How to test

  1. Open the preview environment
  2. Select IntelliJ IDEA as your IDE of choice
  3. Open any new workspace
  4. Hit Shift twice and find Gitpod: Extend Workspace Timeout
  5. Play around. As a wise man once told me: "The world's your oyster"

Release Notes

NONE

Documentation

This most likely will require updating the docs

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
  • /werft publish-to-npm

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=jetbrains
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-filiptronicek-jetbrains-plugin-16107.2 because the annotations in the pull request description changed
(with .werft/ from main)

@gitpod-io gitpod-io deleted a comment from werft-gitpod-dev-com bot Feb 7, 2023
@roboquat roboquat added size/L and removed size/M labels Feb 7, 2023
@filiptronicek
Copy link
Member Author

filiptronicek commented Feb 7, 2023

/werft run

👍 started the job as gitpod-build-filiptronicek-jetbrains-plugin-16107.7
(with .werft/ from main)

@filiptronicek
Copy link
Member Author

filiptronicek commented Feb 7, 2023

/werft run recreate-vm

👍 started the job as gitpod-build-filiptronicek-jetbrains-plugin-16107.8
(with .werft/ from main)

@filiptronicek
Copy link
Member Author

filiptronicek commented Feb 7, 2023

/hold because 74ccaea needs to be reverted before merging (but kept for testing)

@filiptronicek filiptronicek self-assigned this Feb 7, 2023
@filiptronicek filiptronicek force-pushed the filiptronicek/jetbrains-plugin-16107 branch 2 times, most recently from a876068 to 408f64b Compare February 8, 2023 09:59
@filiptronicek filiptronicek marked this pull request as ready for review February 8, 2023 14:49
@filiptronicek filiptronicek requested review from a team February 8, 2023 14:49
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: IDE labels Feb 8, 2023
@filiptronicek filiptronicek changed the title JetBrains Timeout Input Dialog Workspace Timeout improvements Feb 8, 2023
@filiptronicek filiptronicek force-pushed the filiptronicek/jetbrains-plugin-16107 branch from 17838fc to 74ccaea Compare February 8, 2023 16:09
@filiptronicek
Copy link
Member Author

filiptronicek commented Feb 8, 2023

/werft run recreate-vm

👍 started the job as gitpod-build-filiptronicek-jetbrains-plugin-16107.15
(with .werft/ from main)

@filiptronicek
Copy link
Member Author

filiptronicek commented Feb 8, 2023

/werft run recreate-vm

👍 started the job as gitpod-build-filiptronicek-jetbrains-plugin-16107.16
(with .werft/ from main)

@filiptronicek filiptronicek force-pushed the filiptronicek/jetbrains-plugin-16107 branch 3 times, most recently from 9e74a0c to aef6c9d Compare February 8, 2023 18:59
@svenefftinge
Copy link
Member

  • a dialog in JetBrains IDEs so that one can make the workspace timeout anything they desire

    image

UX-wise I believe picking from a few options (e.g. 1h, 3h, 12h, 24h) instead of a text field would be simpler. I can't imagine the need to be very specific here, it's usually just "make sure it doesn't suspend". cc @loujaybee

Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

LGTM

@filiptronicek filiptronicek force-pushed the filiptronicek/jetbrains-plugin-16107 branch 3 times, most recently from e169148 to bd1fdec Compare February 9, 2023 12:33
@loujaybee
Copy link
Member

This looks like it also closes:

Is that correct?

Copy link
Member

@loujaybee loujaybee left a comment

Choose a reason for hiding this comment

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

Cool ! Great job, @filiptronicek

image

@loujaybee
Copy link
Member

loujaybee commented Feb 9, 2023

@svenefftinge - UX-wise I believe picking from a few options (e.g. 1h, 3h, 12h, 24h) instead of a text field would be simpler. I can't imagine the need to be very specific here, it's usually just "make sure it doesn't suspend". cc @loujaybee

I'm thinking potentially along the lines of use cases:

  • Boost 1h/ 2h
  • Full working day 8h
  • Max 24h

@filiptronicek filiptronicek force-pushed the filiptronicek/jetbrains-plugin-16107 branch 5 times, most recently from faff1a4 to c2aabf0 Compare February 9, 2023 22:08
filiptronicek and others added 6 commits February 10, 2023 11:22
1. Only allow decimal values in timeouts
    This allowed users to have durations in other number systems like hexadecimal. For example `0xfd` was a valid timeout.
2. Remove "d" (day) as a unit
    Because this unit is both rejected by the backend and timeouts cannot be longer than 24 hours, it does not make sense to allow it.

Co-authored-by: Lou Bichard <[email protected]>
…reted display duration

This means that 1439m doesn't become "1439 minutes", but rather "29 hours and 59 minutes"
@filiptronicek filiptronicek force-pushed the filiptronicek/jetbrains-plugin-16107 branch from c2aabf0 to 0e33ca6 Compare February 10, 2023 10:22
@filiptronicek
Copy link
Member Author

filiptronicek commented Feb 10, 2023

/unhold

:shipit:

@roboquat roboquat merged commit 880f186 into main Feb 10, 2023
@roboquat roboquat deleted the filiptronicek/jetbrains-plugin-16107 branch February 10, 2023 10:38
@roboquat roboquat added deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: IDE team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jetbrains-plugin] Update Workspace Timeout Logic
4 participants