Skip to content

fix: round custom quotas to whole bytes - #3695

Merged
AlexAndBear merged 2 commits into
mainfrom
fix/quota-float
Oct 13, 2026
Merged

AlexAndBear merged 2 commits into
mainfrom
fix/quota-float

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Quota rounding: custom quotas like 4.1 GB are rounded to whole bytes, so the server no longer rejects 4099999999.9999995 with 400.
  • Validation: values below one byte (e.g. 0) show an error instead of silently becoming "No restriction".

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest)
  • test case 1: createOption('4.1') returns 4100000000
  • test case 2: createOption('0') returns an option with an error

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear merged commit 822daa4 into main Oct 13, 2026
27 checks passed
@AlexAndBear
AlexAndBear deleted the fix/quota-float branch October 13, 2026 09:11
@openclouders openclouders mentioned this pull request Oct 13, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom quotas like 4.1 or 8.2 GB fail with HTTP 400

2 participants