Skip to content

Comments

Improve quota handling, add tests, refactor#47

Merged
rustybee42 merged 6 commits intomainfrom
rb/quota-usage-fix
Feb 13, 2026
Merged

Improve quota handling, add tests, refactor#47
rustybee42 merged 6 commits intomainfrom
rb/quota-usage-fix

Conversation

@rustybee42
Copy link
Collaborator

@rustybee42 rustybee42 commented Jan 12, 2026

  • Always clear quota usage entries before changing target entries. This should fix problems with missing reports (e.g. for uids/gids that are no longer queried or receive no reports).
  • Add tests for fetching quota usage data and calculating and distributing exceeded ids
  • Modify the App to allow mock app handling requests
  • Refactor some of the quota code

@rustybee42 rustybee42 self-assigned this Jan 12, 2026
@rustybee42 rustybee42 force-pushed the rb/quota-usage-fix branch 2 times, most recently from ba7f4d2 to 5763d97 Compare February 11, 2026 13:30
@rustybee42 rustybee42 changed the title fix: Always clear quota usage entries before changing target entries Improve quota handling, add tests, refactor Feb 12, 2026
@rustybee42 rustybee42 marked this pull request as ready for review February 12, 2026 10:38
@rustybee42 rustybee42 requested a review from a team as a code owner February 12, 2026 10:38
@rustybee42 rustybee42 force-pushed the rb/quota-usage-fix branch 4 times, most recently from 08060f7 to 14a431e Compare February 12, 2026 11:35
philippfalk
philippfalk previously approved these changes Feb 13, 2026
Copy link
Member

@philippfalk philippfalk left a comment

Choose a reason for hiding this comment

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

Looks good. I just had a couple of questions for clarification. I focused my review most on the functional changes in this PR and put less effort into reviewing the tests.

We want to get rid of them over time and rather put sql directly into
the handlers instead of having unnecessary abstractions ("db layer").
With the quota usage fix, this is a good opportunity to do so.
Clone and Default are now part of Msg, while the rest of the
requirements in on BaseMsg. This allows creating trait objects from
BaseMsg, which is required to implement the TestApp mock request
handler.
@rustybee42 rustybee42 merged commit bf7b40a into main Feb 13, 2026
4 checks passed
@rustybee42 rustybee42 deleted the rb/quota-usage-fix branch February 13, 2026 12:48
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