Skip to content

Commit 8e9691a

Browse files
authored
Merge branch 'main' into sigusr2
2 parents 8d7507d + fc75db6 commit 8e9691a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+924
-333
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ body:
5757
id: logs
5858
attributes:
5959
label: Logs
60-
description: Run code-server with the --verbose flag and then paste any relevant logs from the server, from the browser console and/or the browser network tab. For issues with installation, include installation logs (i.e. output of `npm install -g code-server`).
60+
description: Run code-server with the --verbose flag and then paste any relevant logs from the server, from the browser console and/or the browser network tab. For issues with installation, include installation logs (i.e. output of `yarn global add code-server`).
6161
- type: textarea
6262
attributes:
6363
label: Screenshot/Video

.github/workflows/ci.yaml

+26-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
node-version: "14"
4040

4141
- name: Install helm
42-
uses: azure/setup-helm@v1.1
42+
uses: azure/setup-helm@v2.1
4343

4444
- name: Fetch dependencies from cache
4545
id: cache-yarn
@@ -217,6 +217,26 @@ jobs:
217217
# Instead, itis determined in publish-npm.sh script
218218
# using GITHUB environment variables
219219

220+
- name: Comment npm information
221+
uses: marocchino/sticky-pull-request-comment@v2
222+
with:
223+
GITHUB_TOKEN: ${{ github.token }}
224+
header: npm-dev-build
225+
message: |
226+
✨ code-server dev build published to npm for PR #${{ github.event.number }}!
227+
* _Last publish status_: success
228+
* _Commit_: ${{ github.event.pull_request.head.sha }}
229+
230+
To install in a local project, run:
231+
```shell-session
232+
npm install @coder/code-server-pr@${{ github.event.number }}
233+
```
234+
235+
To install globally, run:
236+
```shell-session
237+
npm install -g @coder/code-server-pr@${{ github.event.number }}
238+
```
239+
220240
# TODO: cache building yarn --production
221241
# possibly 2m30s of savings(?)
222242
# this requires refactoring our release scripts
@@ -475,6 +495,9 @@ jobs:
475495
run: rm -rf ./release-packages ./test/test-results
476496

477497
trivy-scan-repo:
498+
permissions:
499+
contents: read # for actions/checkout to fetch code
500+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
478501
runs-on: ubuntu-20.04
479502
steps:
480503
- name: Checkout repo
@@ -483,7 +506,7 @@ jobs:
483506
fetch-depth: 0
484507

485508
- name: Run Trivy vulnerability scanner in repo mode
486-
uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18
509+
uses: aquasecurity/trivy-action@2b30463ddb3d11724a04e760e020c7d9af24d8b3
487510
with:
488511
scan-type: "fs"
489512
scan-ref: "."
@@ -494,6 +517,6 @@ jobs:
494517
severity: "HIGH,CRITICAL"
495518

496519
- name: Upload Trivy scan results to GitHub Security tab
497-
uses: github/codeql-action/upload-sarif@v1
520+
uses: github/codeql-action/upload-sarif@v2
498521
with:
499522
sarif_file: "trivy-repo-results.sarif"

.github/workflows/codeql-analysis.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
analyze:
25+
permissions:
26+
actions: read # for github/codeql-action/init to get workflow details
27+
contents: read # for actions/checkout to fetch code
28+
security-events: write # for github/codeql-action/autobuild to send a status report
2229
name: Analyze
2330
runs-on: ubuntu-20.04
2431

@@ -28,13 +35,13 @@ jobs:
2835

2936
# Initializes the CodeQL tools for scanning.
3037
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v1
38+
uses: github/codeql-action/init@v2
3239
with:
3340
config-file: ./.github/codeql-config.yml
3441
languages: javascript
3542

3643
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v1
44+
uses: github/codeql-action/autobuild@v2
3845

3946
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v1
47+
uses: github/codeql-action/analyze@v2

.github/workflows/docker.yaml

+9-11
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@ jobs:
3939
id: version
4040
run: echo "::set-output name=version::$(jq -r .version package.json)"
4141

42-
- name: Download artifact
43-
uses: dawidd6/action-download-artifact@v2
44-
id: download
42+
- name: Download release artifacts
43+
uses: robinraju/[email protected]
4544
with:
46-
branch: v${{ steps.version.outputs.version }}
47-
workflow: ci.yaml
48-
workflow_conclusion: completed
49-
name: "release-packages"
50-
path: release-packages
51-
52-
- name: Run ./ci/steps/docker-buildx-push.sh
53-
run: ./ci/steps/docker-buildx-push.sh
45+
repository: "coder/code-server"
46+
tag: v${{ steps.version.outputs.version }}
47+
fileName: "*.deb"
48+
out-file-path: "release-packages"
49+
50+
- name: Publish to Docker
51+
run: yarn publish:docker
5452
env:
5553
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/docs-preview.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030

3131
- name: Comment Credentials
3232
uses: marocchino/sticky-pull-request-comment@v2
33+
# Only run if PR comes from base repo
34+
# Reason: forks cannot access secrets and this will always fail
35+
if: github.event.pull_request.head.repo.full_name == github.repository
3336
with:
37+
GITHUB_TOKEN: ${{ github.token }}
3438
header: codercom-preview-docs
3539
message: |
3640
✨ code-server docs for PR #${{ github.event.number }} is ready! It will be updated on every commit.

.github/workflows/installer.yml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
2020
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
ubuntu:
2427
name: Test installer on Ubuntu

.github/workflows/npm-brew.yaml

+3-11
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ jobs:
4545
NPM_ENVIRONMENT: "production"
4646

4747
homebrew:
48-
# The newest version of code-server needs to be available on npm when this runs
49-
# otherwise, it will 404 and won't open a PR to bump version on homebrew/homebrew-core
5048
needs: npm
51-
runs-on: macos-latest
49+
runs-on: ubuntu-latest
5250
steps:
5351
# Ensure things are up to date
5452
# Suggested by homebrew maintainers
@@ -60,16 +58,10 @@ jobs:
6058
- name: Checkout code-server
6159
uses: actions/checkout@v3
6260

63-
- name: Checkout cdrci/homebrew-core
64-
uses: actions/checkout@v3
65-
with:
66-
repository: cdrci/homebrew-core
67-
path: homebrew-core
68-
6961
- name: Configure git
7062
run: |
71-
git config user.name github-actions
72-
git config user.email github-actions@github.com
63+
git config user.name cdrci
64+
git config user.email opensource@coder.com
7365
7466
- name: Bump code-server homebrew version
7567
env:

.github/workflows/trivy-docker.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: actions/checkout@v3
5252

5353
- name: Run Trivy vulnerability scanner in image mode
54-
uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18
54+
uses: aquasecurity/trivy-action@2b30463ddb3d11724a04e760e020c7d9af24d8b3
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true
@@ -60,6 +60,6 @@ jobs:
6060
severity: "HIGH,CRITICAL"
6161

6262
- name: Upload Trivy scan results to GitHub Security tab
63-
uses: github/codeql-action/upload-sarif@v1
63+
uses: github/codeql-action/upload-sarif@v2
6464
with:
6565
sarif_file: "trivy-image-results.sarif"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ test/test-results
2222

2323
# Quilt's internal data.
2424
/.pc
25+
/patches/*.diff~

CHANGELOG.md

+28-2
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010
## [9.99.999] - 9090-09-09
1111
12-
VS Code v99.99.999
12+
Code v99.99.999
1313
14-
### Changed
1514
### Added
15+
### Changed
1616
### Deprecated
1717
### Removed
1818
### Fixed
1919
### Security
2020
2121
-->
2222

23+
## [4.3.0](https://github.com/coder/code-server/releases/tag/v4.3.0) - 2022-04-14
24+
25+
Code v1.65.2
26+
27+
### Changed
28+
29+
- Excluded .deb files from release Docker image which drops the compressed and
30+
uncompressed size by 58% and 34%.
31+
- Upgraded to Code 1.65.2.
32+
33+
### Added
34+
35+
- Added a new CLI flag called `--disable-file-downloads` which allows you to
36+
disable the "Download..." option that shows in the UI when right-clicking on a
37+
file. This can also set by running `CS_DISABLE_FILE_DOWNLOADS=1`.
38+
- Aligned the dependencies for binary and npm release artifacts.
39+
40+
### Fixed
41+
42+
- Fixed the code-server version from not displaying in the Help > About dialog.
43+
- Fixed issues with the TypeScript and JavaScript Language Features Extension
44+
failing to activate.
45+
- Fixed missing files in ipynb extension.
46+
- Fixed the homebrew release workflow.
47+
- Fixed the Docker release workflow from not always publishing version tags.
48+
2349
## [4.2.0](https://github.com/coder/code-server/releases/tag/v4.2.0) - 2022-03-22
2450

2551
Code v1.64.2

LICENSE.txt renamed to LICENSE

File renamed without changes.

ci/build/build-release.sh

+27-15
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ main() {
2424
bundle_vscode
2525

2626
rsync ./docs/README.md "$RELEASE_PATH"
27-
rsync LICENSE.txt "$RELEASE_PATH"
27+
rsync LICENSE "$RELEASE_PATH"
2828
rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH"
2929
}
3030

@@ -78,11 +78,25 @@ EOF
7878
bundle_vscode() {
7979
mkdir -p "$VSCODE_OUT_PATH"
8080

81-
# - Some extensions have a .gitignore which excludes their built source from
82-
# the npm package so exclude any .gitignore files.
83-
# - Exclude Node as we will add it ourselves for the standalone and will not
84-
# need it for the npm package.
85-
rsync -avh --exclude .gitignore --exclude /node ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH"
81+
local rsync_opts=()
82+
if [[ ${DEBUG-} = 1 ]]; then
83+
rsync_opts+=(-vh)
84+
fi
85+
86+
# Some extensions have a .gitignore which excludes their built source from the
87+
# npm package so exclude any .gitignore files.
88+
rsync_opts+=(--exclude .gitignore)
89+
90+
# Exclude Node as we will add it ourselves for the standalone and will not
91+
# need it for the npm package.
92+
rsync_opts+=(--exclude /node)
93+
94+
# Exclude Node modules.
95+
if [[ $KEEP_MODULES = 0 ]]; then
96+
rsync_opts+=(--exclude node_modules)
97+
fi
98+
99+
rsync "${rsync_opts[@]}" ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH"
86100

87101
# Add the commit, date, our name, links, and enable telemetry. This just makes
88102
# telemetry available; telemetry can still be disabled by flag or setting.
@@ -99,7 +113,7 @@ bundle_vscode() {
99113
"applicationName": "code-server",
100114
"dataFolderName": ".code-server",
101115
"win32MutexName": "codeserver",
102-
"licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE.txt",
116+
"licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE",
103117
"win32DirName": "code-server",
104118
"win32NameVersion": "code-server",
105119
"win32AppUserModelId": "coder.code-server",
@@ -122,19 +136,17 @@ EOF
122136
) > "$VSCODE_OUT_PATH/product.json"
123137

124138
# Use the package.json for the web/remote server. It does not have the right
125-
# version though so pull that from the main package.json. Also remove keytar
126-
# since the web does not rely on it and that removes the dependency on
127-
# libsecret.
128-
jq --slurp '.[0] * {version: .[1].version} | del(.dependencies.keytar)' \
139+
# version though so pull that from the main package.json.
140+
jq --slurp '.[0] * {version: .[1].version}' \
129141
"$VSCODE_SRC_PATH/remote/package.json" \
130142
"$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
131143

132144
rsync "$VSCODE_SRC_PATH/remote/yarn.lock" "$VSCODE_OUT_PATH/yarn.lock"
133145

134-
if [ "$KEEP_MODULES" = 0 ]; then
135-
rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules"
136-
rm -Rf "$VSCODE_OUT_PATH/node_modules"
137-
fi
146+
# Include global extension dependencies as well.
147+
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions/package.json"
148+
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions/yarn.lock"
149+
rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions/postinstall.js"
138150

139151
pushd "$VSCODE_OUT_PATH"
140152
symlink_asar

ci/build/npm-postinstall.sh

-8
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ vscode_yarn() {
9898

9999
cd extensions
100100
yarn --production --frozen-lockfile
101-
102-
for ext in */; do
103-
ext="${ext%/}"
104-
echo "extensions/$ext: installing dependencies"
105-
cd "$ext"
106-
yarn --production --frozen-lockfile
107-
cd "$OLDPWD"
108-
done
109101
}
110102

111103
main "$@"

ci/build/release-prep.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ main() {
8181
read -r -p "What version of code-server do you want to update to?"$'\n' CODE_SERVER_VERSION_TO_UPDATE
8282

8383
echo -e "Great! We'll prep a PR for updating to $CODE_SERVER_VERSION_TO_UPDATE\n"
84-
$CMD rg -g '!yarn.lock' -g '!*.svg' -g '!CHANGELOG.md' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE"
84+
$CMD rg -g '!yarn.lock' -g '!*.svg' -g '!CHANGELOG.md' -g '!lib/vscode/**' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE"
8585

8686
$CMD git commit --no-verify -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
8787

ci/helm-chart/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.3.0
18+
version: 2.4.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: 4.2.0
23+
appVersion: 4.3.0

ci/helm-chart/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ replicaCount: 1
66

77
image:
88
repository: codercom/code-server
9-
tag: '4.2.0'
9+
tag: '4.3.0'
1010
pullPolicy: Always
1111

1212
# Specifies one or more secrets to be used when pulling images from a
@@ -70,6 +70,8 @@ extraArgs: []
7070
extraVars: []
7171
# - name: DISABLE_TELEMETRY
7272
# value: true
73+
# - name: DOCKER_HOST
74+
# value: "tcp://localhost:2375"
7375

7476
##
7577
## Init containers parameters:
@@ -126,6 +128,7 @@ persistence:
126128
## Enable an Specify container in extraContainers.
127129
## This is meant to allow adding code-server dependencies, like docker-dind.
128130
extraContainers: |
131+
# If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars"
129132
#- name: docker-dind
130133
# image: docker:19.03-dind
131134
# imagePullPolicy: IfNotPresent

0 commit comments

Comments
 (0)