refactor: number of synced objects#1024
Conversation
|
Warning Review limit reached
Next review available in: 32 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe DatasourceStatus.NumberOfObjects field changes from int64 to a pointer *int64. OpenStack and Prometheus controllers update their reconcile-skip logic and status assignment to handle nil pointers. Three Helm alert rules (Cinder, Manila, Nova) add a 1-hour offset condition to detect drops from previously non-zero values. ChangesNumberOfObjects Pointer Migration
Helm Alert Expression Tightening
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@api/v1alpha1/datasource_types.go`:
- Line 235: Regenerate the deepcopy helpers for DatasourceStatus so
zz_generated.deepcopy.go reflects the new NumberOfObjects *int64 field instead
of shallow-copying it, and update every remaining fixture that still assigns a
plain int to NumberOfObjects. Use ptr.To(int64(...)) in the struct literals in
controller_test.go, datasource_state_test.go, and the OpenStack datasource
controller test, and verify the generated DeepCopyInto for DatasourceStatus is
the updated symbol to check.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a7c52893-3667-4993-8d4b-5e2ace8560fe
📒 Files selected for processing (6)
api/v1alpha1/datasource_types.gohelm/bundles/cortex-cinder/templates/alerts.yamlhelm/bundles/cortex-manila/templates/alerts.yamlhelm/bundles/cortex-nova/templates/alerts.yamlinternal/knowledge/datasources/plugins/openstack/controller.gointernal/knowledge/datasources/plugins/prometheus/controller.go
…ll handling in tests
Test Coverage ReportTest Coverage 📊: 70.1% |
PhilippMatthes
left a comment
There was a problem hiding this comment.
Please check if the yaml scaffold needs to be updated and if omitempty is still the right choice
NumberOfObjectsfrom int64 to *int64 so omitempty no longer strips the field when zero, makingkubectl get datasourcedisplay 0 instead of blankSyncObjectsDroppedToZeroalerts to only fire when the metric was previously non-zero (offset 1h > 0), avoiding false alerts for new datasources/regions