Conversation
There was a problem hiding this comment.
Pull request overview
This PR moves E-Series SSD Cache collection/templates to SANtricity OS 12.00.0 and updates the SSD Cache Grafana dashboard to clearly indicate the minimum supported OS version. It also fixes template “best-fit” selection so version folders with leading zeros (e.g. 12.00.0) are correctly resolved.
Changes:
- Add new
ssd_cache.yamltemplates underconf/eseries/12.00.0/andconf/eseriesperf/12.00.0/. - Update the SSD Cache Grafana dashboard to show an “available from SANtricity OS 12.00+” notice and shift panel layout.
- Update
findBestFitto preserve the original version folder name (leading zeros) and add a regression test.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| grafana/dashboards/eseries/ssd_cache.json | Adds an informational row/text notice about SANtricity OS 12.00+ and shifts panel positions. |
| conf/eseriesperf/12.00.0/ssd_cache.yaml | Introduces SSD cache performance/statistics template for 12.00.0. |
| conf/eseries/12.00.0/ssd_cache.yaml | Introduces SSD cache capacity/labels template for 12.00.0. |
| cmd/poller/collector/helpers_test.go | Adds a test ensuring best-fit resolution keeps 12.00.0 folder naming. |
| cmd/poller/collector/helpers.go | Preserves original version directory name when selecting best-fit templates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func Test_findBestFit_LeadingZeroVersion(t *testing.T) { | ||
| repoRoot := "../../.." | ||
| c := &AbstractCollector{ | ||
| Name: "EseriesPerf", | ||
| Logger: slog.Default(), | ||
| } | ||
|
|
||
| got, err := c.findBestFit(repoRoot, "conf", "ssd_cache.yaml", "", buildVersion("12.00.0")) | ||
| assert.Nil(t, err) | ||
| assert.Equal(t, filepath.Base(got), "12.00.0") | ||
| } |
There was a problem hiding this comment.
This test depends on the repository layout and a relative path (repoRoot := "../../..") plus real conf/... contents. To keep the unit tests hermetic and less brittle, consider using t.TempDir() to create a minimal conf/eseriesperf/12.00.0/ssd_cache.yaml directory structure for findBestFit to scan (and pass that temp dir as homePath).
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.