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

quota: avoid accessing disk when updating user disk quotas #201

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

mdonadoni
Copy link
Member

Partially addresses #193

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #201 (89c3e0e) into master (8cc26f7) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
- Coverage   74.32%   74.24%   -0.09%     
==========================================
  Files           7        7              
  Lines         892      893       +1     
==========================================
  Hits          663      663              
- Misses        229      230       +1     
Files Changed Coverage Δ
reana_db/models.py 90.24% <100.00%> (-0.20%) ⬇️
reana_db/utils.py 76.21% <100.00%> (+0.10%) ⬆️

@tiborsimko tiborsimko self-requested a review September 4, 2023 07:58
@tiborsimko tiborsimko self-assigned this Sep 4, 2023
Copy link
Member

@tiborsimko tiborsimko left a comment

Choose a reason for hiding this comment

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

Works nicely 👍 Left one cosmetic comment

@@ -299,6 +299,9 @@ def update_users_disk_quota(
) -> None:
"""Update users disk quota usage.

User disk quotas will be calculated from workflow disk quotas,
so the latter should be updated before the former.
Copy link
Member

Choose a reason for hiding this comment

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

Cosmetics: perhaps add the explicit function name for clarity, e.g. "User disk quota usage will be calculated from the individual workflow disk quota usage numbers, so this function should be typically called only after update_workflows_disk_quota()."

Copy link
Member

Choose a reason for hiding this comment

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

Please also write an entry into CHANGES.rst about performance improvements for disk quota calculations. (The last PR also omitted news item about this.)

@mdonadoni mdonadoni merged commit 89c3e0e into reanahub:master Sep 5, 2023
12 checks passed
@mdonadoni mdonadoni deleted the quota-updater-perf-2 branch September 5, 2023 07:03
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.

2 participants