cluster: fix Grafana VM datasource replacement - #2732
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughGrafana dashboard replacement now processes cluster placeholders before datasource placeholders. Tests model the replacement commands and verify dashboard references resolve to ChangesGrafana datasource replacement
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR makes a localized Grafana VM datasource replacement change with accompanying unit-test updates. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2732 +/- ##
==========================================
- Coverage 42.43% 42.33% -0.10%
==========================================
Files 426 426
Lines 47364 47364
==========================================
- Hits 20096 20050 -46
- Misses 24570 24614 +44
- Partials 2698 2700 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@nolouch: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
bb7133
left a comment
There was a problem hiding this comment.
The production ordering change fixes the test-cluster-vm-vm rewrite, but the new regression test introduces a deterministic failure on macOS. Please make the test portable before merging.
| } | ||
| return nil, nil, nil | ||
|
|
||
| output, err := osexec.CommandContext(ctx, "sh", "-c", cmd).CombinedOutput() |
There was a problem hiding this comment.
[P1] Keep this test portable across supported developer platforms. This executes the Linux-targeted dashboard command on the host. On macOS, BSD sed -i requires a backup suffix, unlike GNU sed; the find -exec invocation still exits successfully, all dashboard substitutions remain unchanged, and the assertions below fail. I reproduced this on exact head 6825fcc9 with go test ./pkg/cluster/spec -run 'TestVictoriaMetricsDefaultDatasource|TestGrafanaDatasourceConfig' -count=1 -v. Please avoid executing this GNU-specific remote command directly on Darwin (for example, gate the command-level test to Linux explicitly, or use a portable test helper/mock that preserves and verifies the production command order).
1286447 to
eea1b10
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Defined2014 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
What problem does this PR solve?
close #xxx
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release notes:
Summary by CodeRabbit
Bug Fixes
Tests