This is the repo for sagemaker-code-editor. For more information on Code Editor on SageMaker, please refer to: https://docs.aws.amazon.com/sagemaker/latest/dg/code-editor.html
The patched-vscode folder's only usage is to help reviewers review the patch changes. To ease reviewing patches (.diff files), whenever we raise a PR for adding/updating a patch, we will also apply the patches to this directory so that this folder's diff shows up in the PR.
Whenever we create a new branch with vscode pointing to a specific commit, this folder must be populated with the same contents as vscode at that particular commit.
To properly patch, please run script:
sh ./scripts/install.sh
This script will:
- use quiltto pop any existing patches.
- update the submodule to verify the local version is in parity with source
- apply all patches with quiltfrom./patches
- runs ./scripts/postinstall.shthat will comment out 2 breakinggit configlines from./vscode/build/npm/postinstall.js
- runs ./scripts/copy-resource.shthat will copy patched version of code - oss from./vscodeinto./patched-vscodefolder along with icon(s) and svg(s) from./resourcesfolder
- runs yarn installand downloads built in extensions on patched submodule
Usage:
Usage: install.sh [-t <VERSION>] [-v] [-h]
Otions:
  -t <VERSION>    Create a tarball with the specified version
  -v              Enable verbose output
  -h              Show this help message- Install Prerequisite tools described here for your operating system.
- Run sh ./scripts/install.sh
- Run yarn watchfrom within thevscodefolder
- Open a new terminal and run ./vscode/scripts/code-server.sh --launch
Follow the previous steps to patch and build the project.
Use the ./scripts/test.sh script for testing.
Usage: test.sh [OPTIONS]
Options:
    -w '<WEBSITE-URL>'|--website='<WEBSITE_URL>'        URL of the Code Editor instance to test (default: http://localhost:9888).
    -u|--unit-test                                      Run OSS unit tests.
    -i|--integ-test                                     Run OSS integration tests.
    -s|--style-check                                    Run OSS style check.
    -c|--cypress-integ-test                             Run Code Editor UI tests.
    -l|--local                                          Run Code Editor UI tests against a local instance (requires -c).
    -n|--no-patches                                     Skip automatic patching of OSS.
    -h|--help                                           Show this help message and exit.
Note: make sure you have the 'quotes' around the website url.
From the sage-maker-code-editor directory, run the following command in your terminal:
sh ./scripts/test.sh --website='http://localhost:9090' -uiclThis will run the OSS unit and integration tests, and the Cypress integration tests for a local Code Editor instance at localhost:9090.
To publish a new release using the GitHub Action, push a tag that starts with v, e.g. v1.5.0. This will trigger an Action to create a tarball and publish it in a release with the tag v1.5.0. Currently the Action will require manual approval from @aws-pangestu, @aws-navinns, or @aws-asolidu.
We hope to extend this Action to also automatically update the CodeEditor feedstock repository.
For any issues that customers would like to report, please route to the amazon-sagemaker-feedback repository: https://github.com/aws/amazon-sagemaker-feedback
See CONTRIBUTING for more information.
This library is licensed under the MIT License. See the LICENSE file.