Skip to content

Commit aaa49d3

Browse files
authored
Merge branch 'main' into docs/add-issue-rsp-install
2 parents 4aed005 + 3054f09 commit aaa49d3

38 files changed

+404
-185
lines changed

.github/workflows/ci.yaml

+24-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
node-version: "16"
4040

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

4444
- name: Fetch dependencies from cache
4545
id: cache-yarn
@@ -143,14 +143,20 @@ jobs:
143143
id: vscode-rev
144144
run: echo "::set-output name=rev::$(git rev-parse HEAD:./lib/vscode)"
145145

146-
# We need to rebuild when we have a new version of Code or when any of
147-
# the patches changed. Use VSCODE_CACHE_VERSION to force a rebuild.
146+
- name: Get version
147+
id: version
148+
run: echo "::set-output name=version::$(jq -r .version package.json)"
149+
150+
# We need to rebuild when we have a new version of Code, when any of
151+
# the patches changed, or when the code-server version changes (since
152+
# it gets embedded into the code). Use VSCODE_CACHE_VERSION to
153+
# force a rebuild.
148154
- name: Fetch prebuilt Code package from cache
149155
id: cache-vscode
150156
uses: actions/cache@v3
151157
with:
152158
path: lib/vscode-reh-web-*
153-
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff') }}
159+
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ steps.version.outputs.version }}-${{ hashFiles('patches/*.diff') }}
154160

155161
- name: Build vscode
156162
if: steps.cache-vscode.outputs.cache-hit != 'true'
@@ -164,7 +170,9 @@ jobs:
164170
if: success()
165171

166172
- name: Upload coverage report to Codecov
167-
run: yarn coverage
173+
uses: codecov/codecov-action@v3
174+
with:
175+
token: ${{ secrets.CODECOV_TOKEN }}
168176
if: success()
169177

170178
# The release package does not contain any native modules
@@ -288,8 +296,11 @@ jobs:
288296
- name: Build standalone release
289297
run: source scl_source enable devtoolset-9 && yarn release:standalone
290298

291-
- name: Sanity test standalone release
292-
run: yarn test:standalone-release
299+
- name: Install test dependencies
300+
run: SKIP_SUBMODULE_DEPS=1 yarn install
301+
302+
- name: Run integration tests on standalone release
303+
run: yarn test:integration
293304

294305
- name: Build packages with nfpm
295306
run: yarn package
@@ -421,8 +432,11 @@ jobs:
421432
- name: Build standalone release
422433
run: yarn release:standalone
423434

424-
- name: Sanity test standalone release
425-
run: yarn test:standalone-release
435+
- name: Install test dependencies
436+
run: SKIP_SUBMODULE_DEPS=1 yarn install
437+
438+
- name: Run integration tests on standalone release
439+
run: yarn test:integration
426440

427441
- name: Build packages with nfpm
428442
run: yarn package
@@ -509,7 +523,7 @@ jobs:
509523
fetch-depth: 0
510524

511525
- name: Run Trivy vulnerability scanner in repo mode
512-
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
526+
uses: aquasecurity/trivy-action@5144f05a8dca0b158e81bc678b850c7999e67c8a
513527
with:
514528
scan-type: "fs"
515529
scan-ref: "."

.github/workflows/docs-preview.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
branches:
66
- main
7+
paths:
8+
- "docs/**"
79

810
permissions:
911
actions: none

.github/workflows/installer.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: ./install.sh
3535

3636
- name: Test code-server
37-
run: yarn test:standalone-release code-server
37+
run: CODE_SERVER_PATH="code-server" yarn test:integration
3838

3939
alpine:
4040
name: Test installer on Alpine
@@ -66,4 +66,4 @@ jobs:
6666
run: ./install.sh
6767

6868
- name: Test code-server
69-
run: yarn test:standalone-release code-server
69+
run: CODE_SERVER_PATH="code-server" yarn test:integration

.github/workflows/npm-brew.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: dawidd6/action-download-artifact@v2
3232
id: download
3333
with:
34-
branch: v${{ steps.version.outputs.version }}
34+
branch: release/v${{ steps.version.outputs.version }}
3535
workflow: ci.yaml
3636
workflow_conclusion: completed
3737
name: "npm-package"

.github/workflows/trivy-docker.yaml

+1-1
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@7b7aa264d83dc58691451798b4d117d53d21edfe
54+
uses: aquasecurity/trivy-action@5144f05a8dca0b158e81bc678b850c7999e67c8a
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/vscode

.prettierrc.yaml

-11
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,3 @@ trailingComma: all
44
arrowParens: always
55
singleQuote: false
66
useTabs: false
7-
8-
overrides:
9-
# Attempt to keep VScode's existing code style intact.
10-
- files: "lib/vscode/**/*.ts"
11-
options:
12-
# No limit defined upstream.
13-
printWidth: 10000
14-
semi: true
15-
singleQuote: true
16-
useTabs: true
17-
arrowParens: avoid

CHANGELOG.md

+56
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,62 @@ Code v99.99.999
2020
2121
-->
2222

23+
## [4.5.1](https://github.com/coder/code-server/releases/tag/v4.5.1) - 2022-07-18
24+
25+
Code v1.68.1
26+
27+
### Changed
28+
29+
- We now use `release/v<0.0.0>` for the release branch name so it doesn't
30+
conflict with the tag name
31+
- Added `.prettierignore` to ignore formatting files in `lib/vscode`
32+
33+
### Added
34+
35+
- Allow more comprehensive affinity config in Helm chart
36+
- Added custom message in Homebrew PR to make sure code-server maintainers are
37+
tagged
38+
- Allow setting `priorityClassName` via Helm chart
39+
- Added troubleshooting docs to `CONTRIBUTING.md`
40+
41+
### Fixed
42+
43+
- Removed default memory limit which was set via `NODE_OPTIONS`
44+
- Changed output in pipe to make it easier to debug code-server when doing live
45+
edits
46+
- Fixed display-language patch to use correct path which broke in 4.5.0
47+
- Fixed multiple code-server windows opening when using the code-server CLI in
48+
the Integrated Terminal
49+
- Fixed Integrated Terminal not working when web base was not the root path
50+
51+
### Security
52+
53+
- Updated `glob-parent` version in dependencies
54+
55+
## [4.5.0](https://github.com/coder/code-server/releases/tag/v4.5.0) - 2022-06-29
56+
57+
Code v1.68.1
58+
59+
### Changed
60+
61+
- Updated codecov to use codecov uploader
62+
- Moved integration tests to Jest
63+
- Fixed docker release to only download .deb
64+
- Upgraded to Code 1.68.1
65+
- Install `nfpm` from GitHub
66+
- Upgraded to TypeScript 4.6
67+
68+
### Added
69+
70+
- Added tests for `open`, `isWsl`, `handlePasswordValidation`
71+
- Provided alternate image registry to dockerhub
72+
- Allowed users to have scripts run on container with `ENTRYPOINTD` environment
73+
variable
74+
75+
### Fixed
76+
77+
- Fixed open CLI command to work on macOS
78+
2379
## [4.4.0](https://github.com/coder/code-server/releases/tag/v4.4.0) - 2022-05-06
2480

2581
Code v1.66.2

ci/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ You can disable minification by setting `MINIFY=`.
4545
- Builds vscode into `./lib/vscode/out-vscode`.
4646
- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`)
4747
- Bundles the output of the above two scripts into a single node module at `./release`.
48-
- [./ci/build/build-standalone-release.sh](./build/build-standalone-release.sh) (`yarn release:standalone`)
49-
- Requires a node module already built into `./release` with the above script.
50-
- Will build a standalone release with node and node_modules bundled into `./release-standalone`.
5148
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
5249
- Removes all build artifacts.
5350
- Useful to do a clean build.
@@ -97,6 +94,8 @@ Helps avoid clobbering the CI configuration.
9794
- Runs `yarn lint`.
9895
- [./steps/test-unit.sh](./steps/test-unit.sh)
9996
- Runs `yarn test:unit`.
97+
- [./steps/test-integration.sh](./steps/test-integration.sh)
98+
- Runs `yarn test:integration`.
10099
- [./steps/test-e2e.sh](./steps/test-e2e.sh)
101100
- Runs `yarn test:e2e`.
102101
- [./steps/release.sh](./steps/release.sh)

ci/build/test-standalone-release.sh

-33
This file was deleted.

ci/dev/postinstall.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ main() {
2929

3030
install-deps test
3131
install-deps test/e2e/extensions/test-extension
32-
install-deps lib/vscode
32+
# We don't need these when running the integration tests
33+
# so you can pass SKIP_SUBMODULE_DEPS
34+
if [[ ! ${SKIP_SUBMODULE_DEPS-} ]]; then
35+
install-deps lib/vscode
36+
fi
3337
}
3438

3539
main "$@"

ci/dev/test-integration.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
help() {
5+
echo >&2 " You can build the standalone release with 'yarn release:standalone'"
6+
echo >&2 " Or you can pass in a custom path."
7+
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration"
8+
}
9+
10+
# Make sure a code-server release works. You can pass in the path otherwise it
11+
# will look for release-standalone in the current directory.
12+
#
13+
# This is to make sure we don't have Node version errors or any other
14+
# compilation-related errors.
15+
main() {
16+
cd "$(dirname "$0")/../.."
17+
18+
source ./ci/lib.sh
19+
20+
local path="$RELEASE_PATH-standalone/bin/code-server"
21+
if [[ ! ${CODE_SERVER_PATH-} ]]; then
22+
echo "Set CODE_SERVER_PATH to test another build of code-server"
23+
else
24+
path="$CODE_SERVER_PATH"
25+
fi
26+
27+
echo "Running tests with code-server binary: '$path'"
28+
29+
if [[ ! -f $path ]]; then
30+
echo >&2 "No code-server build detected"
31+
echo >&2 "Looked in $path"
32+
help
33+
exit 1
34+
fi
35+
36+
CODE_SERVER_PATH="$path" CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration" --testPathIgnorePatterns "./test/integration/fixtures"
37+
}
38+
39+
main "$@"

ci/dev/test-unit.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ main() {
3030
# We must keep jest in a sub-directory. See ../../test/package.json for more
3131
# information. We must also run it from the root otherwise coverage will not
3232
# include our source files.
33-
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@"
33+
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --testRegex "./test/unit/.*ts" --testPathIgnorePatterns "./test/unit/node/test-plugin"
3434
}
3535

3636
main "$@"

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.5.0
18+
version: 3.0.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.4.0
23+
appVersion: 4.5.1

ci/helm-chart/templates/deployment.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ spec:
2525
{{- if .Values.hostnameOverride }}
2626
hostname: {{ .Values.hostnameOverride }}
2727
{{- end }}
28+
{{- if .Values.priorityClassName }}
29+
priorityClassName: {{ .Values.priorityClassName }}
30+
{{- end }}
2831
{{- if .Values.securityContext.enabled }}
2932
securityContext:
3033
fsGroup: {{ .Values.securityContext.fsGroup }}
@@ -116,7 +119,7 @@ spec:
116119
{{- end }}
117120
{{- with .Values.affinity }}
118121
affinity:
119-
{{- toYaml . | nindent 8 }}
122+
{{- tpl . $ | nindent 8 }}
120123
{{- end }}
121124
{{- with .Values.tolerations }}
122125
tolerations:

ci/helm-chart/values.yaml

+22-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.4.0'
9+
tag: '4.5.1'
1010
pullPolicy: Always
1111

1212
# Specifies one or more secrets to be used when pulling images from a
@@ -33,6 +33,8 @@ podAnnotations: {}
3333
podSecurityContext: {}
3434
# fsGroup: 2000
3535

36+
priorityClassName: ""
37+
3638
service:
3739
type: ClusterIP
3840
port: 8080
@@ -145,6 +147,25 @@ extraContainers: |
145147
# - name: DOCKER_DRIVER
146148
# value: "overlay2"
147149

150+
extraInitContainers: |
151+
# - name: customization
152+
# image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
153+
# imagePullPolicy: IfNotPresent
154+
# env:
155+
# - name: SERVICE_URL
156+
# value: https://open-vsx.org/vscode/gallery
157+
# - name: ITEM_URL
158+
# value: https://open-vsx.org/vscode/item
159+
# command:
160+
# - sh
161+
# - -c
162+
# - |
163+
# code-server --install-extension ms-python.python
164+
# code-server --install-extension golang.Go
165+
# volumeMounts:
166+
# - name: data
167+
# mountPath: /home/coder
168+
148169
## Additional code-server secret mounts
149170
extraSecretMounts: []
150171
# - name: secret-files

0 commit comments

Comments
 (0)