ROX-33939: virtual machine v2 reconciliation improvements#19904
ROX-33939: virtual machine v2 reconciliation improvements#19904dashrews78 merged 3 commits intomasterfrom
Conversation
…ciliation Reconciliation only needs IDs, not full VM objects. Use Search() + ResultsToIDSet() — the same pattern all other pipelines use — to avoid deserializing full rows and the manual ID-extraction loop. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
🚀 Build Images ReadyImages are ready for commit 7275fcd. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-645-g7275fcd626 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19904 +/- ##
==========================================
- Coverage 49.60% 49.56% -0.05%
==========================================
Files 2766 2764 -2
Lines 208567 208342 -225
==========================================
- Hits 103454 103259 -195
+ Misses 97436 97430 -6
+ Partials 7677 7653 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe reconciliation logic in the VM pipeline is refactored to use the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@central/sensor/service/pipeline/virtualmachines/pipeline.go`:
- Around line 89-90: reconcileV2 is calling p.virtualMachineV2Store.Search with
a query built by search.NewQueryBuilder().AddExactMatches(...).ProtoQuery()
which relies on the default 100-result page size and thus misses VMs past the
first page; modify reconcileV2 to set explicit pagination on the query (either a
sufficiently large PageSize or, preferably, implement paging by setting/reading
PageToken and looping calls to p.virtualMachineV2Store.Search until no more
results) so you collect the complete set of VMs for the cluster before
reconciling/cleaning up.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: e7c9e062-aafa-4d2d-8080-83bc2c387d41
📒 Files selected for processing (2)
central/sensor/service/pipeline/virtualmachines/pipeline.gocentral/sensor/service/pipeline/virtualmachines/pipeline_test.go
|
/test gke-nongroovy-e2e-tests |
1 similar comment
|
/test gke-nongroovy-e2e-tests |
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
Reconciliation only needs IDs, not full VM objects. Use Search() +
ResultsToIDSet() — the same pattern all other pipelines use — to
avoid deserializing full rows and the manual ID-extraction loop.
Partially generated by AI.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!