Increase default sync interval for OpenStack datasource from 60s to 600s#660
Increase default sync interval for OpenStack datasource from 60s to 600s#660SoWieMarkus merged 2 commits intomainfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDefault OpenStack datasource sync interval changed from 60s to 600s across the Go API type, the CRD schema, and Helm datasource templates. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 Nitpick comments (1)
api/v1alpha1/datasource_types.go (1)
169-171: Plan rollout behavior for existing Datasource objects.This default change affects newly defaulted specs; existing CRs that already persisted
spec.openstack.syncInterval(e.g.,60s) won’t auto-migrate. If a global shift is intended, add a migration/backfill step.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api/v1alpha1/datasource_types.go` around lines 169 - 171, You changed the default for SyncInterval (metav1.Duration field named SyncInterval on the Datasource CR) but existing CRs will keep their persisted spec values, so add a rollout/migration plan: implement a one-time backfill that finds Datasource objects missing spec.openstack.syncInterval (or equal to the old implicit default) and patches them to the new default value, or add controller logic in the reconciliation for DatasourceReconciler to set the field when it’s empty and persist the update; ensure the migration is idempotent, logged, and tested against existing CRs so cluster-wide behavior is consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@api/v1alpha1/datasource_types.go`:
- Around line 169-171: You changed the default for SyncInterval (metav1.Duration
field named SyncInterval on the Datasource CR) but existing CRs will keep their
persisted spec values, so add a rollout/migration plan: implement a one-time
backfill that finds Datasource objects missing spec.openstack.syncInterval (or
equal to the old implicit default) and patches them to the new default value, or
add controller logic in the reconciliation for DatasourceReconciler to set the
field when it’s empty and persist the update; ensure the migration is
idempotent, logged, and tested against existing CRs so cluster-wide behavior is
consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 65024bcc-14cd-4867-88c5-b5656095a195
📒 Files selected for processing (2)
api/v1alpha1/datasource_types.gohelm/library/cortex/files/crds/cortex.cloud_datasources.yaml
Test Coverage ReportTest Coverage 📊: 68.1% |
We encountered a bug in the openstack datasource controller in which initial reconciles are pushed back in the priority queue due to the controller enqueueing new reconciles with higher priority. This can lead to some of the datasources never reconciling. By setting the sync interval to a higher value this decreases the chance of the requeued reconcile to push back initial reconciles indefinitely.