fix(sagemaker): improve error handling when the Space SSH host check fails#8287
Closed
bhavya2109sharma wants to merge 4 commits intoaws:masterfrom
Closed
fix(sagemaker): improve error handling when the Space SSH host check fails#8287bhavya2109sharma wants to merge 4 commits intoaws:masterfrom
bhavya2109sharma wants to merge 4 commits intoaws:masterfrom
Conversation
|
vpbhargav
reviewed
Nov 13, 2025
Contributor
vpbhargav
left a comment
There was a problem hiding this comment.
I think worth testing this change in Widows/Mac and Linux if possible. Hard to validate regex validations and some of these platforms have casing, newline peculiarities.
dylanraws
reviewed
Nov 13, 2025
dylanraws
reviewed
Nov 13, 2025
d4c4eb1 to
078ca7a
Compare
dylanraws
reviewed
Nov 13, 2025
dylanraws
suggested changes
Nov 13, 2025
1937081 to
467e065
Compare
dylanraws
suggested changes
Nov 14, 2025
467e065 to
ccef775
Compare
ccef775 to
f57a0a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When attempting to connect to a SageMaker Space, if the user's SSH config had issues (like the old
User '%r'directive),users would see an unhelpful error :
This happened because:
Solution
Implemented a proactive SSH config validation that checks for outdated config before running SSH validation
Prompts users to update outdated config automatically
Provides helpful error messages with line numbers for external errors
Validates before showing progress dialogs (better UX)
Changes Made
New Files Created
packages/core/src/awsService/sagemaker/sshConfig.ts: CreatedSageMakerSshConfigclass that extends the baseSshConfigclass with SageMaker specific SSH logic.packages/core/src/test/awsService/sagemaker/sshConfig.test.ts- test suiteModified
packages/core/src/awsService/sagemaker/model.ts: RemovedensureValid()fromprepareDevEnvConnection()and added comment explaining validation happens incommands.tspackages/core/src/awsService/sagemaker/commands.ts: AddedvalidateSshConfig()which will validate before showing progress dialogs so that users can fix issues before any connection attempt startsTesting
User '%r')feature/xbranches will not be squash-merged at release time.