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

[wip] maySetTimeout: introduce ogranizationId as argument #18743

Closed
wants to merge 1 commit into from

Conversation

geropl
Copy link
Member

@geropl geropl commented Sep 19, 2023

Description

This is refactoring a bit of tech-debt: We made "default workspace timeout" a user setting. But since UBP the decision whether it gets applied or not depends on the organization. So far, maySetTimeout did not take the organizationId, but had a fallback case which was introduced for compatibility during UBP rollout.

This PR allows to always passes the current organizationId, as well as prepares us to remove the old compatibility code.

In order to do that, it allows all users to set their "default workspace timeout", but hints them that it only affects workspaces started in paid organizations.

Follow-up PR: #18744

Summary generated by Copilot

🤖 Generated by Copilot at 9caad95

This pull request updates the frontend and backend logic of setting the workspace timeout based on the user's subscription and entitlements. It introduces a new hook useMaySetTimeout and a new parameter opts to the maySetTimeout method, which allow passing the organization ID to the server. It also simplifies and improves the code of some related components and services.

Related Issue(s)

Fixes #

How to test

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /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
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@geropl geropl closed this Sep 21, 2023
@geropl geropl deleted the gpl/orgid-timeout branch September 21, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants