fix: IPv4 CIDRPool gatewayIndex is 0 but leaf is second /31 address - #198
Conversation
Greptile SummaryThe PR corrects IPv4 Spectrum-X CIDR pools so the gateway index identifies the leaf at the second address of each /31.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported stale IPv4 pool expectations have been updated consistently. Important Files Changed
Reviews (2): Last reviewed commit: "fix: IPv4 CIDRPool gatewayIndex is 0 but..." | Re-trigger Greptile |
| } | ||
| return cidrPoolSettings{ | ||
| gatewayIndex: 0, | ||
| gatewayIndex: 1, |
There was a problem hiding this comment.
When the Spectrum-X package tests build IPv4 CIDR pools, this change produces GatewayIndex: 1 while two existing expected pools still require GatewayIndex: 0, causing the test suite to fail. Update the existing BuildCIDRPools expectations alongside this contract change.
Knowledge Base Used: Spectrum-X addressing and topology
Signed-off-by: andrewwhitecdw <andrewwhitecdw@users.noreply.github.com>
c948842 to
e714cc7
Compare
|
@greptile-apps Thanks for the review. I updated the remaining IPv4 |
|
That's exactly what was needed — implementation, new unit tests, and existing integration-style tests all aligned on |
This PR addresses the following issue in
pkg/networkoperatorplugin/spectrumx/addressing.go: IPv4 CIDRPool gatewayIndex is 0 but leaf is second /31 address.Changes
pkg/networkoperatorplugin/spectrumx/addressing.go: IPv4 CIDRPool gatewayIndex is 0 but leaf is second /31 address.Details
Tests
pkg/networkoperatorplugin/spectrumx/pool_settings_test.goContributor guidelines
Per this repo's CONTRIBUTING.md:
Signed-off-bytrailer, DCO).Update (post-Greptile review): The remaining existing IPv4
BuildCIDRPoolstest expectations inaddressing_test.gohave been updated toGatewayIndex: 1so the implementation and tests agree. The Spectrum-X addressing test suite now passes (go test ./pkg/networkoperatorplugin/spectrumx/...). Commit:e714cc7464d66d96522c4d45cd9739d591548066.