Skip to content

fix(api): drop invalid R2 orderBy in managed CF checker#31

Merged
mikeumus merged 1 commit into
mainfrom
fix/managed-r2-orderby
Jun 17, 2026
Merged

fix(api): drop invalid R2 orderBy in managed CF checker#31
mikeumus merged 1 commit into
mainfrom
fix/managed-r2-orderby

Conversation

@mikeumus

Copy link
Copy Markdown
Contributor

Follow-up to #30 — same latent bug, managed side.

queryR2Usage ordered r2StorageAdaptiveGroups by sum_objectCount_DESC, an invalid enum (objectCount/payloadSize are max-aggregated gauges, not sums). The query errored every cycle, but the try/catch fell back to a bare bucket list — so R2 detailed metrics (ops, storage GB) have silently always been empty, and R2 threshold violations could never fire.

Fix: drop the orderBy (all returned buckets are iterated regardless of order). tsc clean; 44 CF provider tests pass.

🤖 Generated with Claude Code

queryR2Usage ordered r2StorageAdaptiveGroups by `sum_objectCount_DESC`, an invalid
enum (objectCount/payloadSize are max-aggregated gauges, not sums). The query
errored every cycle, but the try/catch fell back to a bare bucket list — so R2
detailed metrics (ops, storage GB) have silently always been empty/zero, and R2
threshold violations could never fire. Same root cause as the worker fix in #30.

Drop the orderBy (all returned buckets are iterated regardless of order).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mikeumus mikeumus merged commit 31c3fd5 into main Jun 17, 2026
@mikeumus mikeumus deleted the fix/managed-r2-orderby branch June 17, 2026 18:36
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.

1 participant