Skip to content

Apply usage quotas to user sessions#4083

Merged
ciyer merged 8 commits into
feat/usage-quotasfrom
ciyer/resource_quotas
Apr 23, 2026
Merged

Apply usage quotas to user sessions#4083
ciyer merged 8 commits into
feat/usage-quotasfrom
ciyer/resource_quotas

Conversation

@ciyer
Copy link
Copy Markdown
Contributor

@ciyer ciyer commented Mar 17, 2026

Use this again once the notifications have been merged into the feature branch
renku-data-services=build/resource-quotas

/deploy renku-data-services=build/resource-quotas-notification #extra-values=dataService.dataTasks.enableResourceRequestTracking=true

@ciyer ciyer force-pushed the ciyer/resource_quotas branch 4 times, most recently from a3578e9 to 064eb99 Compare March 25, 2026 10:24
@ciyer ciyer force-pushed the ciyer/resource_quotas branch from 064eb99 to 76e35b2 Compare March 26, 2026 13:28
@RenkuBot
Copy link
Copy Markdown
Contributor

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

@ciyer ciyer force-pushed the ciyer/resource_quotas branch 12 times, most recently from 483efc0 to efca541 Compare April 2, 2026 13:52
@ciyer ciyer force-pushed the ciyer/resource_quotas branch 10 times, most recently from 48a3cbc to 27a68f9 Compare April 10, 2026 11:54
@ciyer ciyer force-pushed the ciyer/resource_quotas branch 2 times, most recently from dbb9c7e to 9bdc904 Compare April 14, 2026 09:01
@ciyer ciyer force-pushed the ciyer/resource_quotas branch 3 times, most recently from 5e32174 to 5dd4e34 Compare April 17, 2026 07:58
@ciyer ciyer changed the base branch from main to feat/usage-quotas April 17, 2026 10:27
@ciyer ciyer marked this pull request as ready for review April 17, 2026 10:27
@ciyer ciyer requested a review from a team as a code owner April 17, 2026 10:27
@ciyer ciyer changed the title WIP: resource quota build Apply resource quotas to user sessions Apr 17, 2026
@ciyer ciyer changed the title Apply resource quotas to user sessions Apply usage quotas to user sessions Apr 17, 2026
Comment thread client/src/components/progress/ProgressSteps.tsx Outdated
Comment thread client/src/features/dashboardV2/DashboardV2Sessions.tsx Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note: the UI uses "paused", so we should name it sessionsV2Paused.json

<div className={cx("d-flex", "align-items-center", "gap-2")}>
<Stopwatch fontSize={16} className="flex-shrink-0" />
<span>
<strong>{usageAvailableHours}h of compute time</strong> until quota is
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe this line should also use usageAvailableString().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in b49635d

}) {
if (usageAvailableHours <= 0)
return (
<div className={cx("d-flex", "align-items-center", "gap-2")}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why use a div with flex here? Does it not work to just return <> or a <span>?

return (<><Alarm fontSize={16} className={cx("bi", "me-2")} />Usage...</>);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 53620c2


interface ActiveSessionButtonProps {
className?: string;
usageAvailable: SessionLauncherResourceUsageAvailable;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not pass the resourceClass here?

Suggested change
usageAvailable: SessionLauncherResourceUsageAvailable;
resourceClass: ResourceClassWithIdFiltered;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 1553e1b

>
<div>
<ActiveSessionButton
usageAvailable={{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See comment about using resourceClass in the prop: you would just pass resourceClass={userLauncherClass}.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 1553e1b

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment about the API: I don't understand why the usage values are returned only for the GET /resource_pool endpoint. Would it not make sense to include that in all other resource pool and resource class endpoints?

ciyer added 4 commits April 23, 2026 10:42
* feat: present usage quota information at session launch time
* feat: show usage availabilty information when viewing session launcher details
* feat: show usage availability for running or paused sessions
* feat: show usage availability during session start
* feat: prevent resume if quota is used
@ciyer ciyer force-pushed the ciyer/resource_quotas branch from 4c1cf84 to 987bb52 Compare April 23, 2026 11:03
Copy link
Copy Markdown
Member

@leafty leafty left a comment

Choose a reason for hiding this comment

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

👍

@ciyer ciyer merged commit 05eea09 into feat/usage-quotas Apr 23, 2026
16 of 20 checks passed
@ciyer ciyer deleted the ciyer/resource_quotas branch April 23, 2026 12:39
@RenkuBot
Copy link
Copy Markdown
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

ciyer added a commit that referenced this pull request Apr 23, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
ciyer added a commit that referenced this pull request May 4, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
ciyer added a commit that referenced this pull request May 5, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
ciyer added a commit that referenced this pull request May 8, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
ciyer added a commit that referenced this pull request May 11, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
ciyer added a commit that referenced this pull request May 12, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
ciyer added a commit that referenced this pull request May 12, 2026
* build: update computeResources api
* feat: present usage quota information at session launch time
* feat: show usage quota information when viewing session launcher details
* feat: show usage quota for running or paused sessions
* feat: show usage quota during session start
* feat: prevent resume if usage quota is used
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.

3 participants