-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Option to Ignore SSH Config File #1788
Conversation
WalkthroughThe pull request introduces changes to the SSH connection configuration handling across multiple files. The modifications primarily focus on altering how connection keywords are managed, specifically by removing the The changes span three key files: 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (2)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
pkg/remote/sshclient.go (1)
923-946
: RefactorfindSshDefaults
to eliminate code duplicationThe
findSshDefaults
function duplicates logic fromfindSshConfigKeywords
, such as setting default values for SSH keywords. Consider refactoring these functions to extract common logic into shared helper functions to improve maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
frontend/types/gotypes.d.ts
(1 hunks)pkg/remote/sshclient.go
(3 hunks)pkg/wshrpc/wshrpctypes.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (go)
- GitHub Check: Build for TestDriver.ai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/remote/sshclient.go (1)
715-716
: Enhance error messages with additional contextConsider adding more context to error messages to aid in troubleshooting. For example, in:
err = fmt.Errorf("cannot determine default config keywords: %w", err)Include the host pattern or other relevant details:
- err = fmt.Errorf("cannot determine default config keywords: %w", err) + err = fmt.Errorf("cannot determine default config keywords for host %s: %w", opts.SSHHost, err)This provides clearer information about where and why the error occurred.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
frontend/types/gotypes.d.ts
(1 hunks)pkg/remote/sshclient.go
(3 hunks)pkg/wshrpc/wshrpctypes.go
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- frontend/types/gotypes.d.ts
- pkg/wshrpc/wshrpctypes.go
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Build for TestDriver.ai
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
pkg/remote/sshclient.go (1)
711-711
: Ensure correct JSON tag and consistent usage ofConnIgnoreSshConfig
Verify that the
ConnIgnoreSshConfig
field in thewshrpc.ConnKeywords
struct has the correct JSON tag (e.g.,json:"conn:ignoresshconfig,omitempty"
) and that all references to this field are consistent and correctly spelled across the codebase. This ensures that configuration parsing and serialization work as intended.
This provides a new configuration option that will turn off the ssh config parsing. It also removes the flag required to override the ssh config values with internal json values