-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support specifying workspace class in gitpod.yml #14257
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
Conversation
|
started the job as gitpod-build-fo-class-repo-config.9 because the annotations in the pull request description changed |
|
started the job as gitpod-build-fo-class-repo-config.10 because the annotations in the pull request description changed |
903363d to
4a72c3b
Compare
| "additionalProperties": false, | ||
| "properties": { | ||
| "class": { | ||
| "type": ["string", "array"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this overloaded option makes it unnecessarily complicated. I feel the UX wouldn't suffer much if we always made it a list.
Most of the time, I expect customers would be copying this from the docs so it doesn't matter to them if it's a list or just a string.
| }, | ||
| "workspaceRequirements": { | ||
| "type": "object", | ||
| "description": "Configure the requirements of the workspace.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we talk about requirements. But when those requirements are not satisfied, we fall back to the default. Under this behaviour, it's no longer a requirement, it's a preference.
Can we change the name to workspacePreferences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly worth adding info about what happens when no workspace class matches in here as well.
|
I really think referencing workspace class names here is not the right approach, because it is not declarative/descriptive and I doubt they will be stable. We should instead state what requirements in terms of resources (RAM, VCPU, ...) are needed and then match it against the available classes. A setting for picking a certain workspace class would make more sense in the project configuration. I have added a comment to the issue. |
|
@svenefftinge thanks for your feedback. Let me share a bit more on why I think setting the workspace class right now makes sense:
Re "I doubt they will be stable": I'm pretty sure of that, but that doesn't need to be a problem if when deprecating a workspace class we specify what new workspace class should be used instead. I also doubt that we are aware of all the resource dimensions we will have, particularly on customers' installations. E.g. different CPU frequencies and performance, type of GPU, disk IOPS, network bandwidth, "security level", network proxy and access, ... So having the option to define explicitly the workspace class sounds reasonable and beneficial.
Mixing project configurations and .gitpod.yml sounds like a very bad idea to me. 😬 I understand the benefit of being able to change what shows in the UI/dropdown, and assume that's the reason for your preference (?) but I don't believe the interface should be the deciding factor on whether something is at the repository (file) or the project (UI) level. |
|
FWIW, I'm also not convinced this is the right approach. I'm not sure what the alternative is, but I can at least outline how I think we should think about workspace class selection. A customer is starting a workspace, they should be able to express preferences, and requirements of what they need in a Workspace. Given such a request, apply constraint satisfaction to arrive at a set of possible workspace classes. These classes must strictly match What this does is it flips the product space to the customers needs, rather than forcing them to know (and keep up-to-date) on the possible workspace classes, and whether they work for them. Yes, it's not easy, or necessarily possible, to do this right now. But with this as a north-star, we probably wouldn't choose to put class preferences on the gitpod yaml. |
|
Moving to draft due to ongoing discussion in https://gitpod.slack.com/archives/C02F19UUW6S/p1667389673842289. Feel free to move back to in-review if this should be actioned. |
|
As discussed I'm taking this over and move the implementation to be a project setting. |
|
Closing in favor of #14535 |
Description
Add support for specifying the workspace class in gitpod.yaml
Related Issue(s)
Fixes #10963
How to test
small)defaultworkspace class-> Delete all prebuilds in the database to ensure that the prebuild class is not used for regular workspaces
mallworkspace classsmall)Release Notes
Documentation
Does this PR require updates to the documentation at www.gitpod.io/docs?
Yes: https://github.com/gitpod-io/website/issues/2973
Werft options:
If enabled this will build
install/previewValid options are
all,workspace,webapp,ide