feat(site-explorer): default create_switches to true and log when skipping#3280
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Summary by CodeRabbit
Walkthrough
ChangesDefault create_switches Behavior Change
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/ok to test db3965e |
|
Thanks @mehrdadmoradi-crusoe! I missed the fact @ajf assigned it off to you. I'm actually working on an iterative PR that does a few more things beyond this, BUT, I want to pull in your tweak first, and then I'll base my additional stuff on top of it. Appreciate the help here! |
|
@chet Sure. Sounds good to me. Thanks |
|
@mehrdadmoradi-crusoe There's a |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
db3965e to
728681e
Compare
…pping create_switches defaulted to false while create_machines defaults to true, so with a default config explored switches are identified but never created as Switch objects, and nothing in the logs explains why (NVIDIA#3152). - Default create_switches to true (align with create_machines). - Log at info level when switches are identified but create_switches=false causes them to be skipped. - Update the config reference default in api-core README. Implements the change requested in NVIDIA#3152. Signed-off-by: Mehrdad Moradi <imehrdad2012@gmail.com>
728681e to
a74a2a9
Compare
|
/ok to test a74a2a9 |
There was a problem hiding this comment.
Ahh this needs @polarweasel also due to the docs/ update. I can ping him in the AM!
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3280.docs.buildwithfern.com/infra-controller |
Defaults
[site_explorer] create_switchestotrue(matchingcreate_machines) and adds an info-level log when switches are identified during exploration but skipped becausecreate_switches = false. Also updates the config reference default inapi-core.Related issues
Implements #3152
Type of Change
Breaking Changes
Note: this changes a default — explored switches now auto-create by default. This was explicitly requested in #3152 by @ajf ("we should probably default to create_switches true") and @chet ("we can probably just change the default").
Testing
Manual testing performed
cargo check -p site-explorerpasses.With
create_switches = true(now the default), explored NVOS switches ingest and appear inswitch show. Previously the defaultfalsesilently skipped Switch creation with no log line, whilecreate_machinesdefaulted totrue— the asymmetry is what made it look like a bug.The new log fires once per explore cycle, only when switches were identified and creation was skipped.
Additional Notes
Per @ajf in #3152: "feel free to implement both things.. we should probably default to create_switches true as well as emit a log if it isn't creating them because of the config at info level." Context: evaluating NICo for DPU/bare-metal provisioning at Crusoe (NVIDIA Cloud Partner).