Fix SSH connection sharing#506
Conversation
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesSSHMaster optional socket path threading
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/libstore/ssh.cc`:
- Line 117: The args.insert call at line 117 is using bare string literals and
the .string() method for OS path handling, which is inconsistent with the rest
of the function that uses OS_STR() for string literals and .native() for path
conversions. This inconsistency can cause type mismatches on Windows where
OsString differs from std::string. Replace the bare string literals "-S" and
"none" with OS_STR("-S") and OS_STR("none"), and replace the .string() method
call on socketPath with .native() to ensure consistent OS string handling
throughout the function.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9f130085-796f-497b-98a6-8dfd3553b17e
📒 Files selected for processing (2)
src/libstore/include/nix/store/ssh.hhsrc/libstore/ssh.cc
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
If the user's ssh_config has ControlPersist=yes, then our master process would stick around forever. So override that.
Motivation
Updated version of NixOS#15351 and #311 to fix SSH connection sharing using a master connection.
Context
Summary by CodeRabbit