Skip to content
Closed

1.8 #199

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
53329a7
Fix: Squash commits
aws-ajangg Aug 27, 2025
d919d01
Fix the sagemaker-idle-extension.patch
aakashmandavilli96 Aug 29, 2025
d1e0e67
Remove the displayLanguage.patch,sagemaker-ui-post-startup.patch and …
aakashmandavilli96 Aug 29, 2025
84ed2df
Update series to remove the custom-extensions-marketplace.patch
aakashmandavilli96 Sep 2, 2025
55c00c3
Fix the sagemaker-idle-extension.patch
aakashmandavilli96 Sep 2, 2025
1a05b23
Fix the Sagemaker-ui-post-startup.patch
aakashmandavilli96 Sep 2, 2025
f9c9de9
Fix Custom Extension Patch and add to series
aakashmandavilli96 Sep 3, 2025
e2dd3a4
Add the Signature Verification fix seprate signature-verification.dif…
aakashmandavilli96 Sep 4, 2025
c1ac80a
Add Docker build system and containerized development environment
Sep 9, 2025
8950448
ci: implement GitHub Actions CI/CD pipeline …
aakashmandavilli96 Sep 9, 2025
1469d93
add cypress testing infrastructure
aws-donocl Jul 17, 2024
fa8da6c
reorganize tests in repo
aws-donocl Jul 19, 2024
92b3402
generalize directories
aws-donocl Jul 19, 2024
cf1f8da
update/add READEMEs and incorporate feedback
aws-donocl Jul 22, 2024
184f556
add default automatic patching
aws-donocl Jul 29, 2024
9e56c35
add default website value
aws-donocl Aug 7, 2024
f817926
change default port
aws-donocl Aug 8, 2024
f2ecc50
Create main.yml
aws-donocl Aug 16, 2024
ca9e9e3
Update link to prerequisite tools for 1.90.1
aws-pangestu Aug 19, 2024
f2e1821
**Description**
aws-donocl Aug 21, 2024
3ef147d
**Description**
aws-donocl Aug 20, 2024
bf66b5d
**Description**
aws-donocl Aug 21, 2024
dafd762
Update main.yml
aws-donocl Aug 23, 2024
5c11349
**Description**
aws-donocl Aug 23, 2024
d7ba4b8
update CONTRIBUTING.md with new information about pull requests
aws-donocl Aug 30, 2024
83893ad
**Description**
aws-donocl Aug 30, 2024
496ead9
Fix test.sh usage description in readme
aws-donocl Aug 30, 2024
8a39d06
**Description**
aws-donocl Sep 5, 2024
f69f2c7
Update Patched VS Code version to 1.93.0 with patches applied
aws-aijiacen Sep 12, 2024
d4e6735
Revert "Update Patched VS Code version to 1.93.0 with patches applied"
aws-aijiacen Sep 12, 2024
bb0c721
Create CODEOWNERS
aws-pangestu Mar 28, 2025
f401918
initial patch
aws-pangestu Mar 12, 2025
e4a69a1
Remove check for metadata file and commit
aws-pangestu Mar 19, 2025
7821994
remove exists
aws-pangestu Mar 19, 2025
f2c8703
pass dummy commit
aws-pangestu Mar 20, 2025
9ee0e43
Remove product
aws-pangestu Mar 20, 2025
3c6cb78
remove extra logging
aws-pangestu Mar 20, 2025
3c8c216
Update patched-vscode
aws-pangestu Mar 21, 2025
06f7dea
Add patch header
aws-pangestu Mar 21, 2025
15bfc14
Add installation logic
aws-pangestu Apr 11, 2025
0ca7bbc
Fix: Squash commits
aws-pangestu Apr 11, 2025
e45b96b
ci: implement GitHub Actions CI/CD pipeline …
aakashmandavilli96 Sep 9, 2025
533715f
Added local build using docker buildx to test local changes and generate
Sep 11, 2025
9bf7557
Merge feature/docker-build-system
aws-ajangg Sep 17, 2025
68100bf
Update build.yml
austinjang2 Sep 17, 2025
5584901
Update build.yml
austinjang2 Sep 17, 2025
3fe54df
Delete ..bfg-report directory
austinjang2 Sep 17, 2025
35ce05c
Delete test/integ directory
austinjang2 Sep 17, 2025
1842df5
Delete .github/workflows/codebuild-ci.yml
austinjang2 Sep 17, 2025
a855b1f
Delete bin directory
austinjang2 Sep 17, 2025
dc8f908
Delete scripts/test.sh
austinjang2 Sep 17, 2025
49f06f2
Delete CODEOWNERS
austinjang2 Sep 17, 2025
5f84a8e
Modify timeout for build
aws-ajangg Sep 17, 2025
825782e
Merge branch 'test1.8' of github.com:austinjang2/sagemaker-code-edito…
aws-ajangg Sep 17, 2025
40d8637
Resolve merge conflict with 1.8
aws-ajangg Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-P ubuntu-latest=node:22-bookworm
--container-options=--memory=32g --network=host
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Exclude large directories that aren't needed for build
vscode/node_modules

# Exclude build artifacts
*.tar.gz
*.log

# Exclude development files
.vscode/
.idea/
*.swp
*.swo
*~

# Exclude OS files
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vscode-reh-web-linux-x64/node filter=lfs diff=lfs merge=lfs -text
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# The main job for building the application
build:
name: Build sagemaker-code-editor
runs-on: ubuntu-latest
Expand Down Expand Up @@ -37,7 +38,13 @@ jobs:
- name: Apply patches (if any)
run: |
if [ -d patches ] && [ "$(ls -A patches)" ]; then
quilt push -a || true
{
quilt push -a --leave-rejects --color=auto
} || {
printf "\nPatching error, review logs!\n"
find ./vscode -name "*.rej"
exit 1
}
fi

- name: Set Development Version
Expand All @@ -53,18 +60,17 @@ jobs:
cd vscode
export DISABLE_V8_COMPILE_CACHE=1
export UV_THREADPOOL_SIZE=4

npm install -g node-gyp

# Install dependencies using npm, skip optional and native modules
npm install

VSCODE_RIPGREP_VERSION=$(jq -r '.dependencies."@vscode/ripgrep"' package.json)
mv package.json package.json.orig
jq 'del(.dependencies."@vscode/ripgrep")' package.json.orig > package.json

npm install
npm install --ignore-scripts "@vscode/ripgrep@${VSCODE_RIPGREP_VERSION}"

# Run the gulp build task with memory optimizations
ARCH_ALIAS=linux-x64
npx gulp vscode-reh-web-${ARCH_ALIAS}-min
node --max-old-space-size=32768 --optimize-for-size \
./node_modules/gulp/bin/gulp.js \
"vscode-reh-web-${ARCH_ALIAS}-min"

- name: Find build output
id: find_output
Expand Down Expand Up @@ -96,7 +102,8 @@ jobs:
tar czf $TARBALL -C "$PARENT_DIR" "$BUILD_DIR_NAME"

- name: Upload build artifact
if: env.ACT == ''
uses: actions/upload-artifact@v4
with:
name: npm-package
path: sagemaker-code-editor-${{ env.VERSION }}.tar.gz
path: sagemaker-code-editor-${{ env.VERSION }}.tar.gz
21 changes: 9 additions & 12 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@ jobs:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Download build artifact
if: github.event_name != 'pull_request'
uses: actions/download-artifact@v4
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@v4
with:
name: build-package
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
node-version: 20
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run E2E tests
run: |
# Add your actual E2E test commands here
echo "Running E2E tests..."
echo "[PLACEHOLDER] Running E2E tests..."
# Example: npm run test:e2e
- uses: actions/upload-artifact@v4
if: failure()
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.DS_Store
.pc
.pc
.artifacts
bin
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ Contributions via pull requests are much appreciated. Before sending us a pull r
To send us a pull request, please:

1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
2. Create a branch for your change.
3. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
4. Ensure local tests pass.
5. Commit to your fork using clear commit messages.
6. Push that branch to the upstream `aws/sagemaker-code-editor` repository.
7. Send us a pull request (from your branch in `aws/sagemaker-code-editor`), answering any default questions in the pull request interface.

> ***Important***: Our tests will **always fail** if the pull request does not come from a branch in the `aws/sagemaker-code-editor` repository.
8. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
Expand Down
74 changes: 74 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.PHONY: build-cache build install-act run-github run-local clean-vscode clean

build-cache:
@echo "Building SageMaker Code Editor (multi-stage npm cache)..."
docker buildx build \
--platform linux/amd64 \
--progress=plain \
--memory=32g \
-t npm-cache:latest \
-f scripts/Dockerfile.build.cache .

build:
@echo "Building SageMaker Code Editor (original)..."
docker buildx build \
--platform linux/amd64 \
--progress=plain \
--memory=32g \
--output type=local,dest=./.artifacts \
-t localbuild:latest \
-f scripts/Dockerfile.build .

install-act:
@echo "Installing act (GitHub Actions runner)..."
@if ! command -v act >/dev/null 2>&1 && [ ! -f ./bin/act ]; then \
curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | bash; \
echo "act installed successfully"; \
else \
echo "act is already available"; \
fi

run-github: install-act
@echo "Running complete GitHub Actions workflow locally..."
@echo "Available workflows:"
@ls -la .github/workflows/
@echo ""
@echo "Running full build.yml workflow..."
@if command -v act >/dev/null 2>&1; then \
act push -W .github/workflows/build.yml --platform ubuntu-22.04=catthehacker/ubuntu:act-22.04 --container-options "--memory=32g --memory-swap=32g"; \
else \
./bin/act push -W .github/workflows/build.yml --platform ubuntu-22.04=catthehacker/ubuntu:act-22.04 --container-options "--memory=32g --memory-swap=32g"; \
fi

run-local:
@if [ -z "$(TARBALL)" ]; then \
echo "Building and running SageMaker Code Editor locally on port 8888..."; \
docker build -f scripts/Dockerfile.dev -t local-code-editor-dev . || exit 1; \
echo "Stopping container..."; \
docker stop local-code-editor-dev; \
sleep 2; \
echo "Starting container on http://localhost:8888"; \
docker run --rm -d -p 8888:8000 -v .:/workspace --entrypoint /workspace/scripts/run-code-editor-dev.sh --name local-code-editor-dev local-code-editor-dev || exit 1; \
docker logs -f local-code-editor-dev; \
else \
echo "Building and running SageMaker Code Editor locally on port 8888..."; \
docker build -f scripts/Dockerfile.run --build-arg TARBALL=$(TARBALL) -t local-code-editor . || exit 1; \
echo "Stopping container..."; \
docker stop local-code-editor; \
sleep 2; \
echo "Starting container on http://localhost:8888"; \
docker run --rm -d -p 8888:8000 --name local-code-editor local-code-editor || exit 1; \
docker logs -f local-code-editor; \
fi

clean-vscode:
@echo "Cleaning VSCode node_modules..."
@find . -type d -name "node_modules" -exec rm -rf {} + 2>/dev/null || true
@rm -rf vscode/out/* 2>/dev/null || true
@echo "VSCode cleanup completed"

clean: clean-vscode
@echo "Cleaning act temporary files and Docker images..."
@echo "Removing act cache..."
@rm -rf ~/.cache/act 2>/dev/null || true
@echo "Act cleanup completed"
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ This script will:
- Run `yarn watch` from within the `vscode` folder
- Open a new terminal and run `./vscode/scripts/code-server.sh --launch`

## Make Commands

Available make targets for building and testing:

### 1. When making local changes to iterate faster where tarball generation is not required [each run takes 10-20 mins]
- `make run-local` - Build and run SageMaker Code Editor locally from source and does not require a TARBALL; this process runs a watcher so changes are automatically picked from local workspace
- `make clean-vscode` - Cleans node_modules and out files

### 2. Once local changes are tested; follow this process to generate minified tarball [each run takes ~40 mins to build]
- `make build-cache` - Build SageMaker Code Editor with multi-stage npm cache; Run once and layer gets cached with node_modules
- `make build` - Build SageMaker Code Editor and output artifacts (tarball) to ./artifacts
- `make run-local TARBALL=<tarball-name>` - Build and run SageMaker Code Editor locally on port 8888 using specified tarball from previos step. Example: `make run-local TARBALL=sagemaker-code-editor-1.101.2.tar.gz`

### 3. This process is used to test and simulate github workflows locally [each run takes ~60 mins]
- `make run-github` - Run complete GitHub Actions workflow locally using act

### 4. Cleanup
- `make clean` - Cleans node_modules, out files, and act temporary files


## Troubleshooting and Feedback

For any issues that customers would like to report, please route to the `amazon-sagemaker-feedback` repository: https://github.com/aws/amazon-sagemaker-feedback
Expand All @@ -38,4 +58,4 @@ See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more inform

## License

This library is licensed under the MIT License. See the LICENSE file.
This library is licensed under the MIT License. See the LICENSE file.
Binary file added artifacts/sagemaker-code-editor-1.101.2.tar.gz
Binary file not shown.
10 changes: 9 additions & 1 deletion patched-vscode/src/vs/server/node/remoteLanguagePacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export function getNLSConfiguration(language: string, userDataPath: string): Pro
let result = _cache.get(key);
if (!result) {
// The OS Locale on the remote side really doesn't matter, so we pass in the same language
<<<<<<< HEAD
result = lp.getNLSConfiguration("dummy_commit", userDataPath, metaData, language, language).then(value => {
=======
result = lp.getNLSConfiguration("dummy_commmit", userDataPath, metaData, language, language).then(value => {
>>>>>>> 34c670ba (Update patched-vscode)
if (InternalNLSConfiguration.is(value)) {
value._languagePackSupport = true;
}
Expand Down Expand Up @@ -79,4 +83,8 @@ const stripComments = (content: string): string => {
return match;
}
});
};
<<<<<<< HEAD
};
=======
};
>>>>>>> 34c670ba (Update patched-vscode)
2 changes: 1 addition & 1 deletion patched-vscode/src/vs/server/node/webClientServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,4 +563,4 @@ export class WebClientServer {
serveError(req, res, 500, error.message)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3210,4 +3210,4 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
collector.addRule(`.extension-editor .body .subcontent .runtime-status ${ThemeIcon.asCSSSelector(infoIcon)} { color: ${infoColor}; }`);
collector.addRule(`.monaco-hover.extension-hover .markdown-hover .hover-contents ${ThemeIcon.asCSSSelector(infoIcon)} { color: ${infoColor}; }`);
}
});
});
Loading