Archived
1
0
Commit Graph

3311 Commits

Author SHA1 Message Date
renovate[bot]
4f0d5566c3
chore(deps): update minor dependency updates (#5301)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 16:25:52 +00:00
renovate[bot]
79e96a99d3
chore(deps): update codecov/codecov-action action to v3 (#5305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 08:55:44 -07:00
renovate[bot]
c99f4cef25
chore(deps): update azure/setup-helm action to v3 (#5302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-28 12:57:29 -07:00
Joe Previte
1296848afc
refactor: switch to codecov-uploader GitHub Action (#5303)
* refactor: switch to codecov-uploader GitHub Action

codecov deprecated their Node wrapper for uploading coverage reports.

This removes that and uses their new uploaded along with the v2 GitHub
Action they maintain.

* fix: update broken integration test
2022-06-28 10:04:35 -07:00
Joe Previte
c51ff3bce1
refactor: move integration tests to Jest (#5275)
* feat: add installExtension integration test

This adds a new helper function called `runCodeServerCommand` along with
a test for `--install-extension`. We can use this approach for writing
integration tests (i.e. testing a real code-server build, CLI commands,
etc).

* refactor: s/ test:standalone with test:integration

This replaces our integration approach to use Jest instead of a single
bash script. By doing this, we will be able to easily maintain and add
to our integration test suite.

* refactor: filter unit tests

Now that our integration tests also use Jest, we need to update our unit
test script to ignore `test/integration`.

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* fixup!: skip submod deps

* refactor: move runCodeServerCommand into sep. file

When Jest runs a test, it loads all the files and imports for that test.
This means you might be "requiring" code that's unrelated to your tests.

This leads to unexpected errors depending on where the code runs.

Moved this file to avoid GLIBC and other errors relaed to argon2 when
running integration tests in CI.

* fizup: formatting

* fizup: increase timeout

* refactor: use fixture in installExtension test

Instead of relying on a network to install an extension, we use a
fixture - vsix file in the repo. This is also faster.

* feat: add integration test for listExtensions

* chore: ignore integration fixtures

* fixup: formatting

* fixup: remove custom-hacks.css

* fixup: formatting

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* fixup: contributing integration tests section

* fixup: update ci/readme

* fixup: use RELEASE_PATH in test-integration.sh

* refactor: unzip vsix for listExtensions

* refactor: use exec instead of spawn

* Update docs/CONTRIBUTING.md

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* refactor: use different default binary path

* fixup!: formatting

Co-authored-by: Asher <ash@coder.com>
2022-06-24 16:33:38 +00:00
renovate[bot]
a879844c2d
chore(deps): update aquasecurity/trivy-action digest to 7b7aa26 (#5289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-22 20:05:22 +00:00
renovate[bot]
f2693d366c
chore(deps): update minor dependency updates (#5276)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-06-22 16:26:20 +00:00
Asher
5ce99f8d1c
chore: update Code to 1.68 (#5263)
* chore: update Code to 1.67

Was able to remove our changes to common/webview.ts since they are
upstream now.

Other than that no serious changes, just context diffs.

* chore: update Code to 1.68

- Upstream moved the web socket endpoint so change the Express route
  from / to *.  That will let web sockets work at any endpoint.
- Everything in the workbench config is basically the same but
  de-indented (upstream extracted it into a separate object which
  resulted in a de-indent), the ordering is slightly different, and
  instead of vscodeBase we now need vscodeBase + this._staticRoute since
  everything is served from a sub-path now.
- Move manifest link back to the root since that is where we host our
  manifest.
- Change RemoteAuthoritiesImpl to use the same path building method as
  in other places (+ instead of using URI.parse/join).
- Use existing host/port in RemoteAuthoritiesImpl and
  BrowserSocketFactory instead of patching them to use window.location
  (these are set from window.location to begin with so it should be the
  same result but with less patching).
- Since BrowserSocketFactory includes a sub-path now (endpoints were
  changed upstream to serve from /quality/commit instead of from the
  root) the patch there has changed to prepend the base to that
  path (instead of using the base directly).
- The workbench HTML now natively supports a base URL in the form of
  WORKBENCH_WEB_BASE_URL so no need for VS_BASE patches there anymore.
- Upstream added type="image/x-icon" so I did as well.
- Move the language patch to the end of the series so it is easier to
  eventually remove.
- Remove the existing NLS config in favor of one that supports
  extensions.
- Upstream deleted webview main.js and inlined it into the HTML so move
  that code (the parent origin check) into both those HTML files
  (index.html and index-no-csp.html).
- The remaining diff is from changes to the surrounding context or a
  line was changed slightly by upstream (for example renamed files or
  new arguments like to the remote authority resolver).

* fix: modify product.json before building

Code injects this into the client during the build process so it needs
to be updated before we build.

* fix: update inline script nonces

* Update HTML base path test

* fix: missing commit

Code overrides it with nothing.

The date is also already injected.

* fix: web extensions breaking when the commit changes

By just using the marketplace directly instead of going through the
backend.  I am not sure what the point is when searching extensions
already goes directly to the marketplace anyway.

But also remove the prefix that breaks this as well because otherwise
existing installations will break.
2022-06-21 21:51:46 +00:00
Joe Previte
eb314ff727
chore: only download .deb in docker release (#5277)
* Update docker.yaml

* Update docker.yaml
2022-06-17 08:02:33 -07:00
Joe Previte
61138b4a61
refactor: open function (#5257)
* refactor: fix type annotations in open

There was no clear reason as to why we needed to use type assertions
when initializing both `args` and `options` in `open` so I refactored
them both.

* refactor: create constructOpenOptions

* refactor: add urlSearch and remove options

* feat: add tests for constructOpenOptions
2022-06-15 20:53:07 +00:00
renovate[bot]
113ad85b37
chore(deps): update minor dependency updates (#5244)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-15 13:29:52 -07:00
Ben Potter
a2bfcfcc78
chore: update Coder messaging on README (#5268)
* chore: update Coder messaging

* use our shortlink
2022-06-15 09:49:49 -05:00
Joe Previte
a96162d075
feat: add tests for node/util.open (#5256) 2022-06-13 21:16:46 +00:00
Joe Previte
744b301c7a
Update bug-report.yml (#5262) 2022-06-13 20:18:51 +00:00
Joe Previte
ba990668a5
chore: update bug report template (#5261)
* chore: update bug report template

Add an additional checkbox to the bug report template

* Update .github/ISSUE_TEMPLATE/bug-report.yml
2022-06-13 12:51:30 -07:00
Joe Previte
2c1cf0259e
feat: add tests for isWsl (#5251)
* refactor: add docs to isWsl and make easier to test

* feat: add tests for isWsl

* fixup!: refactor isWsl and tests

* Update test/unit/node/util.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/unit/node/util.test.ts

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
2022-06-10 20:00:20 +00:00
Joe Previte
d75883bcc6
feat: add additional test for handlePasswordValidation (#5243) 2022-06-06 11:20:22 -07:00
renovate[bot]
792e954937
chore(deps): update aquasecurity/trivy-action digest to df3fb7d (#5239)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-06 08:51:15 -07:00
Asher
5d47282ea5
fix: install nfpm straight from GitHub (#5214)
* fix: install nfpm straight from GitHub

install.goreleaser.com appears to no longer be available.

* Add -f to curl commands

This might have made it so we got the right error rather than erroring
on the envsubst step.
2022-05-20 12:39:54 -07:00
Petar Petrov
d3f58f9b7d
Fix caddy installation docs (#5209)
Applies Caddy installations documentation fixes and also resolves the following issue when trying to install Caddy:

    W: GPG error: https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABA1F9B8875A6661

See:

 - 930109ec33
 - 2e255b1ee3
 - 0f4885e592
2022-05-19 22:36:06 +00:00
Feng Yu
1e304b1e7d
chore(deps): upgrade typescript to v4.6 (#5202) 2022-05-13 16:57:50 +00:00
djarbz
5276e41606
Allow user Entrypoint scripts (#5194)
* Allow user Entrypoint scripts

* Variable encapsulation

Co-authored-by: Asher <ash@coder.com>

* Check if Entrypoint Dir exists & run all executable

* Don't create entrypoint.d by default

* yarn fmt

* yarn fmt

* Fix for SC2044

* Revert "yarn fmt"

This reverts commit 5ca347f361.

Co-authored-by: Asher <ash@coder.com>
2022-05-11 22:10:04 +00:00
Feng Yu
dedd770a78
docs: rename master to main in all github doc links (#5190)
* docs: correct link master -> main

* fix missing ]
2022-05-11 14:39:57 -07:00
Joe Previte
a02f47714e refactor: remove unused code enumToArray 2022-05-10 23:26:04 +00:00
Joe Previte
b13849ded0
refactor: remove dead code (#5188)
* refactor: delete unused code

* refactor: move onLine to test helpers

* Revert "refactor: move onLine to test helpers"

This reverts commit 32cc27b213.

* fixup! refactor: delete unused code
2022-05-10 22:44:54 +00:00
Devin Buhl
7a8d487729
chore: push code-server image to GHCR (#5187) 2022-05-10 16:11:06 -05:00
renovate[bot]
1788537cce
chore(deps): update minor dependency updates (#5181)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-10 21:01:13 +00:00
renovate[bot]
0155a12500
chore(deps): update docker/setup-qemu-action action to v2 (#5166)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-05-10 20:35:25 +00:00
renovate[bot]
53b5d41271
chore(deps): update docker/setup-buildx-action action to v2 (#5164)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-05-10 13:13:45 -07:00
renovate[bot]
55006ccb5a
chore(deps): update docker/login-action action to v2 (#5163)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-10 12:37:05 -07:00
Joe Previte
cd78f32dc0
refactor(util): remove unused isObject function (#5183) 2022-05-10 00:24:25 +00:00
Joe Previte
3207bfd4ad
feat: add test for isFile when error (#5182)
This adds an additional test for the `isFile` utility function to ensure
it returns `false` in the event of an error.
2022-05-09 23:24:40 +00:00
Joe Previte
7c1a45a8d8
chore: update --help for disable-file-downloads (#5176)
* chore: update --help for disable-file-downloads

* fixup: formatting
2022-05-06 23:08:25 +00:00
Joe Previte
60dd8ab374
chore: configure git globally for brew publish (#5173) 2022-05-06 22:31:03 +00:00
Asher
6cf607eab9
fix: Docker push (#5175)
The action actually does not support wildcards but it does support * for
downloading all artifacts.
2022-05-06 16:57:22 -05:00
Joe Previte
f735c87ac7
release: 4.4.0 (#5169)
* chore(release): bump version to 4.4.0

* chore: update CHANGELOG with v4.4.0

* chore: bump version to 2.5.0 in Chart.yaml
2022-05-06 13:45:49 -07:00
Joe Previte
5a5798e45f
fix(update): add OrEqual to update.checked test (#5171)
* fix(update): add OrEqual to update.checked test

* fixup!: change all instances to OrEqual

* fixup!: add missing equals

* fixup!: consistency
2022-05-06 16:51:44 +00:00
Feng Yu
66a364358a
chore: upgrade developmemt node version to v16 (#5167)
Co-authored-by: yufeng.freeman <yufeng.freeman@bytedance.com>
2022-05-06 09:57:19 -05:00
Asher
ef0d76bc16
fix: patch telemetry (#5158)
This seems to have been dropped in the rewrite.
2022-05-04 18:32:12 -05:00
Joe Previte
88e971c609
refactor(heart): bind class methods and make beat async (#5142)
* feat: set up new test for beat twice

* refactor: make Heart.beat() async

This allows us to properly await heart.beat() in our tests and remove
the HACK I added before.

* refactor: bind heart methods .beat and .alive

This allows the functions to maintain access to the Heart instance (or
`this`) even when they are passed to other functions. We do this because
we pass both `isActive` and `beat` to `heartbeatTimer`.

* feat(heart): add test to ensure no warnings called

* fixup!: revert setTimeout for heartbeatTimer

* fixup!: return promise in beat
2022-05-04 16:05:48 -07:00
Joe Previte
7027ec7d60
chore: upgrade Code to 1.66 (#5135)
* chore: upgrade Code to 1.66

* docs: update docs for Code upgrades

* fixup!: docs

* chore: update vscode submodule

* chore: update integration patch

* chore: update node-version patch

* chore: update github-auth patch

They completely changed how auth is handled for GitHub in
https://github.com/microsoft/vscode/pull/145424 so our patch may not
work. Will need to test and revisit.

* refactor: remove postinstall patch

It appears they renamed postinstall.js to postinstall.mjs and removed
the use of `rimraf` which means our patch is no longer needed! 🎉

b0e8554cce

* chore: refresh local-storage patch

* chore: refresh service-worker patch

* chore: bulk refresh patches

* fixup!: docs formatting

* refactor: remove unused last-opened patch

* fixup!: formatting docs

* fixup!: formatting docs

* refactor: remove rsync postinstall

* Revert "refactor: remove rsync postinstall"

This reverts commit 8d6b613e9d.

* refactor: update postinstall.js to .mjs

* feat(patches): add parent-origin bypass

* docs(patches): add notes for testing store-socket

* docs(patches): update testing info for node-version

* refactor(patches): delete github-auth.diff patch

* docs(patches): add notes for testing connection-type

* fixup!: delete github-auth patch

* fixup!: update connection type testing

* docs(patches): add notes to insecure-notification.diff

* docs(patches): add nots for update-check.diff

* fixup!: remove comma in integration patch

* fix(e2e): disable workspace trust

* refactor: add --no-default-rc for yarn install

* feat(patches): remove yarnrc in presinstall

* fixup!: silly mistake

* docs: add note about KEEP_MODULES=1

* docs(patches): add testing notes for node-version

* refactor(patches): remove node-version

It appears this is no longer needed due to the `remote/package.json` now which
targets node rather than electron.

* fixup!: add cd ../.. to code upgrade instructions

* fixup!: add note to yarn --production flag

* fixup!: make parent-origin easier to upstream

* Revert "refactor(patches): delete github-auth.diff patch"

This reverts commit 31a354a343.

* Revert "fixup!: delete github-auth patch"

This reverts commit bdeb5212e8.

* Merge webview origin patch into webview patch

* Remove unused post-install patch

* Prevent builtin extensions from updating

* Refresh sourcemaps patch

* Update Node to v16

This matches the version in ./lib/vscode/remote/.yarnrc.

I changed the engine to exactly 16 since if you use any different
version it will just not work since the modules will have been built for
16 (due to the .yarnrc).

* Replace fs.rmdir with fs.rm

Node is showing a deprecation warning about it.

* Update github-auth patch

The local credentials provider is no longer used when there is a remote
so this code moved into the backend web credential provider.

* Prevent fs.rm from erroring about non-existent files

We were using fs.rmdir which presumably did not have the same behavior
in v14 (in v16 fs.rmdir also errors).

* Install Python 3 in CentOS CI container

Co-authored-by: Asher <ash@coder.com>
2022-05-04 21:58:49 +00:00
Asher
4e93db5b95
feat: relaunch on SIGUSR2 (#4979)
This is because Node uses SIGUSR1 to enable the debug listener so even
if you just want to restart code-server you end up enabling the debug
listener as well.

Opted to leave the SIGUSR1 handler in to avoid breaking existing
workflows even though it does mean even if you only want to enable the
debug listener you will end up restarting code-server as well.  We could
consider removing it after a transition phase.
2022-04-27 10:10:48 -05:00
renovate[bot]
fc75db6edc
chore(deps): update azure/setup-helm action to v2 (#5088)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-26 21:48:39 +00:00
Joe Previte
e3c8bd692c
feat(cli): support true for CS_DISABLE_FILE_DOWNLOADS (#5134)
After some feedback, we realized it is more intuitive to disable file
downloads by setting the environment variable
`CS_DISABLE_FILE_DOWNLOADS` to `true` than `1`. This commit adds support
for both.
2022-04-26 20:09:53 +00:00
mooff
a0b36147ea
fix: listening on IPv6 address not possible (#5133)
Wrap IPv6 addresses in square brackets when making URL in ensureAddress,
fixing regression (#1582)
2022-04-26 19:33:51 +00:00
Joe Previte
683412cb01
refactor: add timeout for race condition in heart test (#5131)
* refactor: add timeout for race condition in heart test

* fixup!: set mtime to 0 and check for update

* fixup!: use utimes directly instead of file open

* fixup!: remove import
2022-04-26 17:39:37 +00:00
Joe Previte
18ff99693b
feat: add tests for node/heart.ts (#5122)
* refactor(heart): extract logic into heartbeatTimer fn

To make it easier to test, I extract heartbeatTimer into it's own
function.

* feat(testing): add tests for heart.ts

* fixup

* fixup!: remove unneeded heart call

* Update src/node/heart.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: use mockResolvedValue everywhere

* fixup!: add stat test for timestamp check

Co-authored-by: Asher <ash@coder.com>
2022-04-26 16:35:40 +00:00
renovate[bot]
ed7bd2e65b
chore(deps): update github/codeql-action action to v2 (#5129)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-25 15:39:32 -07:00
Asher
c35bf1311e
chore: provide details when update.checked tests fail (#5115)
Using the toBe* functions will let us know what the actual values are
rather than just telling us true does not equal false.
2022-04-19 15:46:23 -05:00
renovate[bot]
7780a13cce
chore(deps): update aquasecurity/trivy-action digest to 2b30463 (#5098)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-19 11:37:47 -07:00