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

[ws-manager] allow user custom closed timeout #16278

Merged
merged 1 commit into from
Feb 10, 2023
Merged

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Feb 7, 2023

Description

This PR introduces custom closed timeout, which allows users to customize closed timeout in user preference (need discuss only allow opt-out or can set to anytime)

workspace timeout means inactive timeout

This is the workspace part, it only contains

  1. add SetTimeout props (type), which allow set workspace timeout or closed timeout, default is workspace timeout, so it's compatible with previous call methods, can be deployed separately
  2. if the user change workspace timeout, it will automatic disabled closed timeout.
  3. add closed_timeout in StartWorkspaceSpec.
  4. if closed_timeout set to 0, it means we disabled check closed timeout
  5. change timeout condition -> if workspace in closed status, check closed timeout, if not timeout, continue to check workspace timeout

Related Issue(s)

Relate #16089

How to test

  1. open this branch in gitpod.io, wait preview environment context install.
  2. open preview environment
  3. change your bill to a paid plan, you can find test card in here
  4. start a workspace in this preview environment, run gp timeout set 1h
  5. run kubectl describe pods ws-{your-workspace-instance-id} in your step 1 workspace to check pod annotation. it should be like this.
              gitpod/customClosedTimeout: 0
              gitpod/customTimeout: 60m
  1. close web ide, wait for 10m, and check workspace not timeout.
  2. change timeout to 10m, and wait for 10m, make sure workspace timeout.

Release Notes

NONE

Documentation

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
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-slow-database
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

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=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-pd-custom-close-timeout.4 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added the size/L label Feb 7, 2023
@iQQBot iQQBot force-pushed the pd/custom-close-timeout branch from c8e599c to f40a338 Compare February 9, 2023 10:28
@roboquat roboquat added size/M and removed size/L labels Feb 9, 2023
@iQQBot iQQBot changed the title custom closed timeout [ws-manager] custom closed timeout Feb 9, 2023
@iQQBot iQQBot changed the title [ws-manager] custom closed timeout [ws-manager] allow user custom closed timeout Feb 9, 2023
@iQQBot iQQBot marked this pull request as ready for review February 9, 2023 14:53
@iQQBot iQQBot requested a review from a team February 9, 2023 14:53
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Feb 9, 2023
@iQQBot iQQBot force-pushed the pd/custom-close-timeout branch from 4ea516e to 99515b4 Compare February 9, 2023 16:39
@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 10, 2023

@WVerlaek I addressed your feedback, could you review it again? 🙏

@WVerlaek
Copy link
Member

Changes lgtm, running some tests now. Do we have/get docs for this as well?

@roboquat roboquat merged commit 377f00c into main Feb 10, 2023
@roboquat roboquat deleted the pd/custom-close-timeout branch February 10, 2023 10:16
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/M team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the "close timeout" (IDE + editor timeout) to a user preference.
4 participants