aws / aws/amazon-sagemaker-feedback
External browser returns True for Code Editor 3.5.1
- Dominant language
- No language data
- Stars
- 10
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### Product Version
- [ ] Amazon SageMaker Studio Classic
- [x] Amazon SageMaker Studio
- [ ] Issue is not related to SageMaker Studio
### Issue Description
## Summary of findings
Since upgrading code editor version from 3.5.0 to 3.5.1, we've seen the behavior change of snowflake connection using [externalbrowser](https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver-authenticate#use-single-sign-on-sso-through-a-web-browser) method.
After further debugging, found that this is likely due to code editor version change, specifically `browser.sh ` file introduced in code editor version 1.7.5(conda package) changes the default behavior of external browser handling.
By checking the content, 3.5.0 ships sagemaker-code-editor-1.7.1 without`/opt/conda/share/sagemaker-code-editor/bin/helpers/browser.sh` while 3.5.1 ships sagemaker-code-editor-1.7.5 with it.
```bash
wget -q https://conda.anaconda.org/conda-forge/linux-64/sagemaker-code-editor-1.7.1-h4085919_0.conda
wget -q https://conda.anaconda.org/conda-forge/linux-64/sagemaker-code-editor-1.7.5-hd6838e5_1.conda
```
```bash test.py
#!/usr/bin/env sh
# # Copyright (c) Microsoft Corporation. All rights reserved. #
ROOT="$(dirname "$(dirname "$(dirname "$(readlink -f "$0")")")")"
APP_NAME="code-oss"
VERSION="1.90.1"
COMMIT=","
EXEC_NAME="code-oss"
CLI_SCRIPT="$ROOT/out/server-cli.js" "$ROOT/node" "$CLI_SCRIPT" "$APP_NAME" "$VERSION" "$COMMIT" "$EXEC_NAME" "--openExternal" "$@“
```
This change looks to launch the external browser automatically which was not be the case in the previous version. Consequently, it impacts on Python’s webbrowser module as this change causes the web-browser open status set to True.
### TLDR; Root cause in one sentence
A zero-exit browser helper added in sagemaker-code-editor-1.7.5 changes the externalwebbrowser behavior.
### Expected Behavior
Code editor works as it has been.
### Observed Behavior
Code editor does not work as it has been.
### Product Category
Code-Editor
### Feedback Category
Reliability and Stability
### Other Details
My expectation here is ask for the clarification if this is expected or not, and if this change is expected, request to document externally so user can be aware of this change.
Contributor guide
Research direction
Start by comparing the sagemaker-code-editor-1.7.1 and 1.7.5 packages, focusing on helpers/browser.sh and the test.py reproduction. Check how the zero-exit browser helper changes Python's webbrowser status; done means clarifying whether this behavior is expected and documenting the change externally if it is retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python, shell
- Domain
- cloud, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100