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

Implement quota interface - with better logic isolation and unit tests. #10212

Merged
merged 9 commits into from
Nov 18, 2020

Conversation

jmchilton
Copy link
Member

@jmchilton jmchilton commented Sep 11, 2020

  • Add 'interface' (abc) Quota agent with more documentation to define the interface jobs and user pieces have to quota management.
  • Remove unused 'get_user_quotas' method from implementations of quota_agent.
  • Add factory method to refactor logic for determining which quota agent to use out of galaxy/app and into galaxy.quota.
  • Break get_quota into get_quota and get_quota_nice_size based on return type - I think return types varying so wildly based on input parameters is an anti-pattern.
  • Unit tests that cover a lot of the complex get_quota logic.
  • Integration test case for simple API testing of quotas.
  • Refactor checking if quota is exceeded out of job.handler so it can be tested in isolation and so new functionality for quota calculation is extended in quota modules and not in job handler logic. I think this will make User-based ObjectStore #4840 a little cleaner.

@jmchilton jmchilton added the kind/refactoring cleanup or refactoring of existing code, no functional changes label Sep 11, 2020
@jmchilton jmchilton force-pushed the quota_interface branch 2 times, most recently from 2fef5a9 to 30cbc41 Compare September 11, 2020 21:27
@jmchilton jmchilton changed the title [WIP] Implement quota interface, refactor access to quota checking. [WIP] Implement quota interface - with better logic isolation and unit tests. Sep 11, 2020
@jmchilton jmchilton changed the title [WIP] Implement quota interface - with better logic isolation and unit tests. Implement quota interface - with better logic isolation and unit tests. Sep 14, 2020
- Add 'interface' (abc) Quota agent with more documentation to define the interface jobs and user pieces have to quota management.
- Remove unused 'get_user_quotas' method from implementations of quota_agent.
- Add factory method to refactor logic for determining which quota agent to use out of galaxy/app and into galaxy.quota.
- Break get_quota into get_quota and get_quota_nice_size based on return type - I think return types varying so wildly based on input parameters is an anti-pattern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin kind/enhancement kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants