make redis optional in committer-only mode - #209
Conversation
|
Warning Review limit reached
Next review available in: 20 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR makes Redis/Valkey optional when running in committer-only mode ( ChangesOptional Redis wiring and validation
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Operator as "main()"
participant Config as "Config Validation"
participant Redis as "Redis/Valkey"
participant Watch as "Watch Cursor Store"
Operator->>Config: validateAuditConfig(redisAddr, authorAttribution)
Config-->>Operator: error if attribution enabled and redisAddr empty
Operator->>Config: validateAdmissionWebhookConfig(redisAddr, webhookEnabled)
Config-->>Operator: error if webhook enabled and redisAddr empty
alt redisAddr set
Operator->>Redis: NewRedisStore + readiness gate
Operator->>Watch: wire Redis-backed cursor store
else redisAddr empty
Operator->>Watch: leave cursor store nil (cold replay on restart)
end
alt authorAttribution enabled
Operator->>Redis: build attribution index, start audit ingress
else committer-only mode
Operator->>Operator: log committer identity or no-redis mode
end
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Signed-off-by: Constantin Ewert <c.ewert@micromata.de>
Signed-off-by: Constantin Ewert <c.ewert@micromata.de>
73c9a91 to
f35fbe3
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/gitops-reverser/values.yaml`:
- Around line 163-169: Update the Redis/Valkey comments in the queue.redis
section to remove the stale committer-only requirement note that says Redis is
still required. Keep the guidance in sync with the newer text so it clearly
states that an empty addr is allowed in committer-only mode and that Redis is
only required when attribution.enabled is true; check the nearby queue.redis
documentation block and remove or rewrite the outdated sentence.
In `@cmd/main.go`:
- Around line 176-197: Normalize cfg.redisAddr before the Redis setup branch in
cmd/main.go so whitespace-only values are treated the same as empty input;
otherwise the redisStore/newRedisReadinessGate path still runs for blank
addresses. Update the conditional around the Redis initialization to use the
trimmed value (or normalize cfg.redisAddr once near validation/config loading)
and keep the rest of the redisStore, watchMgr.WatchCursorStore, and
newRedisReadinessGate flow unchanged for real addresses.
In `@README.md`:
- Line 141: The quick-start still hardcodes Valkey installation without showing
the committer-only no-Redis path, so update the README quick-start section to
make the optional flow runnable. In the quick-start commands around the “Install
Valkey with auth” step, add a clear skip path and show the `queue.redis.addr=""`
override for the committer-only mode, keeping the instructions aligned with the
optional Valkey heading and the runnable setup.
- Around line 50-54: The README’s Redis guidance is inconsistent: the
operating-modes text still says every install requires Valkey/Redis even though
the newer committer-only paragraph says it is optional. Update the older
operating-modes section to match the new behavior, using the same Redis
terminology and the “committer-only” mode wording so the README stays consistent
end-to-end.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 787150ce-7acf-4560-baf3-23e98afc8a6b
📒 Files selected for processing (8)
README.mdcharts/gitops-reverser/values.yamlcmd/main.gocmd/main_audit_server_test.godocs/UPGRADING.mddocs/architecture.mddocs/config-flag-conventions.mddocs/configuration.md
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
sunib
left a comment
There was a problem hiding this comment.
Nice! Thanks for doing this, and fast! Good step in making the first steps easier.
Description
in committer-only mode, redis/valkey is no longer a hard requirement
Type of Change
Please delete options that are not relevant.
Testing
Checklist
Related Issues
Closes #204
Summary by CodeRabbit
New Features
Bug Fixes
Tests