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

feat: configure disk storage for Renku 2.0 sessions #3463

Merged
merged 15 commits into from
Jan 14, 2025

Conversation

leafty
Copy link
Member

@leafty leafty commented Dec 23, 2024

Closes #3451.

Add an option to configure disk storage in 3 locations:

  • Add launcher
  • Modify launcher's resource class
  • Custom launch

Breaking change: requires update to renku-data-services.

Add launcher
Screenshot 2024-12-23 at 15 30 04

Modify launcher's resource class
image

Custom launch
image

Offcanvas warning
This can happen if the disk storage was set through the API or if the admin changed the quotas on the resource pools.
image

/deploy renku-data-services=main

@leafty leafty temporarily deployed to renku-ci-ui-3463 December 23, 2024 09:08 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-3463.dev.renku.ch

@leafty leafty temporarily deployed to renku-ci-ui-3463 December 23, 2024 10:08 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3463 December 23, 2024 13:31 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3463 December 23, 2024 14:22 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3463 December 23, 2024 14:31 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3463 December 24, 2024 09:29 — with GitHub Actions Inactive
@leafty leafty marked this pull request as ready for review December 24, 2024 09:49
@leafty leafty requested a review from a team as a code owner December 24, 2024 09:49
@leafty leafty temporarily deployed to renku-ci-ui-3463 January 3, 2025 08:49 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-3463 January 3, 2025 09:02 — with GitHub Actions Inactive
Copy link
Contributor

@andre-code andre-code left a comment

Choose a reason for hiding this comment

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

The session with the custom disk size work as expected, however I noticed a few things that could be improved:

  • The disk size option isn’t visible until you change the resource class selector. It would be better if it was always visible when a resource class is selected. It only happens when the form is use for first time.
Screenshot 2025-01-06 at 15 05 06
  • If the disk size exceeds the available limit, the input shows an error, but the error message isn’t displayed. We should make sure the error message is shown when this happens.
Screenshot 2025-01-06 at 14 50 07
  • When trying to delete the current value with the keyboard, the toggle gets triggered instead, so it’s not possible to delete the value. This needs to be fixed so users can delete the value without triggering the toggle.
    change disk

Also, I’m curious—why add the toggle to show the input instead of just keeping the input always visible? It could make the experience smoother for the user.

@leafty
Copy link
Member Author

leafty commented Jan 6, 2025

Also, I’m curious—why add the toggle to show the input instead of just keeping the input always visible? It could make the experience smoother for the user.

The question is: how to handle the difference between keeping the value unset (and thus using the default value from the resource class) and setting the value equal to the default for the resource class?

@lorenzo-cavazzi
Copy link
Member

After thinking about this, I wonder if we need to distinguish between default and manually set.
Once the session is started, it doesn't matter if the value was manually set or taken from the default. I agree with Andrea that leaving the slider always visible simplifies the UX.

@leafty
Copy link
Member Author

leafty commented Jan 7, 2025

After thinking about this, I wonder if we need to distinguish between default and manually set.

Yes, because the default value can be changed by an admin, while a value specifically set here will only be changed by the project members.

@lorenzo-cavazzi
Copy link
Member

Yes, because the default value can be changed by an admin, while a value specifically set here will only be changed by the project members.

True, but would that make any difference to users with running sessions? Even if an admin changes the default, the running sessions won't be affected immediately. And we don't want to accidentally resize the disk while patching as well.
It seems safer (and easier) to use the default for the first input and not automatically modify that as long as the session lives

@leafty
Copy link
Member Author

leafty commented Jan 7, 2025

True, but would that make any difference to users with running sessions? Even if an admin changes the default, the running sessions won't be affected immediately. And we don't want to accidentally resize the disk while patching as well.
It seems safer (and easier) to use the default for the first input and not automatically modify that as long as the session lives

This basically does not apply, disk storage can only affect new sessions. The disk is not resized upon pause/resume (that would be very disruptive).

I think it would be good to merge a way to configure disk storage instead of insisting upon a better way to configure storage (you're free to patch it afterwards).

@leafty
Copy link
Member Author

leafty commented Jan 7, 2025

Also, storing the value when not touched by users would prevent admins from "upgrading" the session classes. Right now, if an admin upgrades the default storage to be 4GB instead of 1GB, then all users without a value set would benefit from the upgrade. With your solution, no user would get the automatic upgrade to session storage.

@lorenzo-cavazzi
Copy link
Member

I totally agree with this:

I think it would be good to merge a way to configure disk storage instead of insisting upon a better way to configure storage (you're free to patch it afterwards).

I might have lost some bits here and there; I thought my suggestions implied less work, not more. And I'm afraid of the possible negative consequences of downsizing. Anyway, let's try to merge the changes and, if needed, we can adjust details later

@leafty
Copy link
Member Author

leafty commented Jan 7, 2025

And I'm afraid of the possible negative consequences of downsizing.

Why? This cannot affect any existing session.

@leafty
Copy link
Member Author

leafty commented Jan 7, 2025

@lorenzo-cavazzi feel free to patch things here or make an alternate PR from here.

Copy link
Contributor

@andre-code andre-code left a comment

Choose a reason for hiding this comment

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

The code looks great and works as expected. It's intuitive, and the error messages are clear and helpful. Great job!

@leafty leafty merged commit 88d44e7 into main Jan 14, 2025
19 checks passed
@leafty leafty deleted the leafty/fix-3451-persist-disk-storage branch January 14, 2025 08:32
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to customize the amount of storage when starting a session
4 participants