Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Greptile SummaryThis PR deprecates fake-node support, migrates Confidence Score: 5/5Safe to merge; changes are internally consistent and all tests are updated. Both findings are P2. No P0 or P1 issues found. The float64→int mapstructure coercion works correctly via the native numeric decoder without WeaklyTypedInput. The block_sizes → blockSizes rename is intentional and fully applied across the codebase. pkg/engines/slurm/slurm.go (backward compat), pkg/engines/slurm/slurm_test.go (test coverage gap) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["HTTP Request\n{blockSizes: [2,4]}"] --> B["JSON parse\n→ []interface{}{float64(2),float64(4)}"]
B --> C["config.Decode / mapstructure\n(float64→int coercion OK)"]
C --> D["BaseParams.BlockSizes []int"]
D --> E["GetTranslateConfig"]
E --> F["translate.Config.BlockSizes []int"]
F --> G["getBlockSizes()"]
G -->|"len > 0"| H["Return as-is"]
G -->|"len == 0"| I["Auto-compute\n[D, 2D, 4D, ...]"]
H --> J["toBlockTopology\nBlockSizes=2,4"]
I --> J
J --> K["Slurm topology.conf\nBlockSizes=2,4"]
Reviews (2): Last reviewed commit: "fix(slurm/slinky):" | Re-trigger Greptile |
| @@ -88,15 +51,7 @@ func getBlockSize(blocks []*blockInfo, requestedBlockSizes []int, useFake bool) | |||
| } | |||
There was a problem hiding this comment.
No validation on caller-provided
requestedBlockSizes
The old getBlockSize validated that values were > 0 and followed the 2^n * base pattern, falling back to auto-computed sizes on failure. The new implementation passes any caller-supplied slice through unchanged. A client submitting blockSizes: [0] or blockSizes: [-5, 3] will now produce a Slurm config line like BlockSizes=0,-5,3, which is silently invalid and will likely cause scontrol reconfigure to reject the topology. Consider adding a basic guard, e.g. reject non-positive values and return an error instead of propagating them to the config file.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
==========================================
- Coverage 68.46% 68.13% -0.33%
==========================================
Files 82 81 -1
Lines 4842 4805 -37
==========================================
- Hits 3315 3274 -41
Misses 1395 1395
- Partials 132 136 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- deprecate fake nodes - preserve provided blockSizes - set blockSizes as an array in topology requests - use camelCase in topology request Signed-off-by: Dmitry Shmulevich <dshmulevich@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pull-request-297.docs.buildwithfern.com/topograph |
Description
Checklist
git commit -s).