Skip to content

fix: address auth map growth, quota rollback, body close, and CSI shutdown#380

Merged
poyrazK merged 1 commit intomainfrom
fix/batch-2026-05-02
May 2, 2026
Merged

fix: address auth map growth, quota rollback, body close, and CSI shutdown#380
poyrazK merged 1 commit intomainfrom
fix/batch-2026-05-02

Conversation

@poyrazK
Copy link
Copy Markdown
Owner

@poyrazK poyrazK commented May 2, 2026

Summary

Test plan

  • go build ./internal/core/services/... ./cmd/... ./tests/...
  • go vet ./internal/core/services/... ./cmd/...
  • go test -race ./internal/core/services/... -count=1

Fixes #280, #297, #307, #283

…ceful shutdown

- auth.go (#280): add hard size limits (maxFailedAttemptsMap=1000,
  maxLockoutsMap=10000) for deterministic eviction when maps grow
  beyond threshold, supplementing the existing probabilistic purge
- instance.go (#297): rollback vCPU and memory quota when enqueue
  fails after IncrementUsage (previously leaked quota on enqueue error)
- gateway_e2e_test.go (#307): use defer to close response body for
  all code paths, not just on HTTP 200
- csi-driver/main.go (#283): wait for d.Stop() completion with 5s
  timeout before exiting main, preventing signal handler goroutine leak
Copilot AI review requested due to automatic review settings May 2, 2026 18:37
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Warning

Rate limit exceeded

@poyrazK has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 12 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 16d68e39-bca0-48cc-8410-53b2720b5ef5

📥 Commits

Reviewing files that changed from the base of the PR and between 98cd65c and e152404.

📒 Files selected for processing (4)
  • cmd/csi-driver/main.go
  • internal/core/services/auth.go
  • internal/core/services/instance.go
  • tests/gateway_e2e_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/batch-2026-05-02

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 56 minutes and 12 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner Author

@poyrazK poyrazK left a comment

Choose a reason for hiding this comment

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

It's okay to merge

@poyrazK poyrazK merged commit 18c15a5 into main May 2, 2026
26 checks passed
@poyrazK poyrazK review requested due to automatic review settings May 2, 2026 18:58
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.

AuthService failedAttempts and lockouts maps grow without cleanup

1 participant