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

User quota is updated to GB from Bytes #1749

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Feb 12, 2025

@Didayolo @ObadaS

Description

User quota was configured in bytes. Now I have changed it to GB so that it is readable. After deployment, all users quota should be updated from bytes to GB.

This documentation here shows how you can do that. I have reorganized the wiki page to gather quota related admin procedures at one place here

Manual intervention

Reset User Quota from Bytes to GB

Using django shell

docker compose exec django ./manage.py shell_plus
from profiles.quota import reset_all_users_quota_to_gb
reset_all_users_quota_to_gb()

Issues this PR resolves

A checklist for hand testing

  • check that function to reset user quota to GB works
  • check that you cannot upload files when your quota is filled
  • check that you can now understand and can easily change the quota in the django admin and using the shell as shown in the documentation
  • check that it is clear for you and for wiki readers that the quota is in GB e.g. 15 GB

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@ihsaan-ullah ihsaan-ullah mentioned this pull request Feb 12, 2025
5 tasks
@ObadaS
Copy link
Collaborator

ObadaS commented Feb 13, 2025

Hello,
The function to update user quota from bytes to GB is only used once after we deploy this PR, right ?
If yes, then we should move it from the Admin Procedures page to the Upgrade Codabench page

@ObadaS
Copy link
Collaborator

ObadaS commented Feb 13, 2025

I deployed the changes on my local PC and everything seems to be working fine. The conversion went fine, without resetting custom quotas, changing quota worked correctly, created new users shows the updated quota display in GB instead of bytes, and it's not possible to submit something if the quota is over the limit already

@Didayolo
Copy link
Member

Manual intervention

Reset User Quota from Bytes to GB

Using django shell

docker compose exec django ./manage.py shell_plus
from profiles.quota import reset_all_users_quota_to_gb
reset_all_users_quota_to_gb()

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