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

[server] Return raw duration from getWorkspaceTimeout #10896

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

andrew-farries
Copy link
Contributor

Description

Add a new rawDuration field to the object returned by getWorkspaceTimeout. This represents the workspace timeout as a string in the format 30m, 60m, 180m. The existing duration field translates these times into short or extended.

This is necessary for the new gp timeout show command (#10782) to present the workspace timeout in a format that makes the most sense to the user.

Related Issue(s)

#10782

How to test

  1. Open the preview environment and start a workspace.
  2. In the browser console on the workspaces list run:
await window._gp.gitpodService.server.getWorkspaceTimeout()

Observe the new rawDuration field in the response object:

{
  "duration": "short", 
  "durationRaw": "30m"
  "canChange": true,
}

Release Notes

NONE

Documentation

None

Werft options

  • /werft with-preview

Include the raw duration from getWorkspaceTimeout, ie in the format
'60m' before translation to 'short' or 'extended' etc.
@andrew-farries andrew-farries requested a review from a team June 24, 2022 10:20
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jun 24, 2022
@andrew-farries
Copy link
Contributor Author

andrew-farries commented Jun 24, 2022

/werft run with-preview

👍 started the job as gitpod-build-af-return-raw-duration-from-getworkspace-time.2
(with .werft/ from main)

@andrew-farries andrew-farries mentioned this pull request Jun 24, 2022
3 tasks
@geropl geropl self-assigned this Jun 24, 2022
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

LGTM, tested and works 👍

@roboquat roboquat merged commit 5cc4e3d into main Jun 24, 2022
@roboquat roboquat deleted the af/return-raw-duration-from-getworkspace-timeout branch June 24, 2022 13:56
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants