Commit Graph

503 Commits

Author SHA1 Message Date
Joe Previte 6e9e411542
fix: add --clobber to release-github-assets script (#4628)
Co-authored-by: Asher <ash@coder.com>
2021-12-15 20:11:35 +00:00
hyk 5960a6728c
support git-lfs default (#4611)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-12-14 16:08:25 -07:00
Joe Previte c77999bcd3
release: 4.0.0 (#4597)
* chore(release): bump version to 4.0.0

* Bump test plugin code-server engine

Co-authored-by: Asher <ash@coder.com>
2021-12-10 13:30:53 -07:00
Asher 4b4ec37880
Fix relative paths (#4594)
* Add tests for relativeRoot

* Remove path.posix.join

Since this is for file system paths it feels incorrect to use it on
URL paths as they are different in many ways.

* Rewrite cookie path logic

Before we relied on the client to resolve the base given to it by the
backend against the path.

Instead have the client pass that information along so we can resolve it
on the backend.  This means the client has to do less work.

* Do not remove out directory before watch

This is re-used for incremental compilation.

Also remove del since that was the only use (and we can use fs.rmdir in
the future if we need something like this).

* Remove unused function resolveBase
2021-12-08 15:52:15 -06:00
Asher c3eb9b800e
Remove excessive reloading before VS Code is ready (#4589)
The watch script was reloading the web server after every extension
compilation which is not necessary plus VS Code will not even be ready
at that point anyway.

Instead restart when the main compilation is finished.  The string to
match with includes a "with" because otherwise it would match "Finished
compilation extensions" which is not the main compilation task where we
actually need to restart the web server.

I also replaced this.log with console.log because the former does not
include a newline and it appears we want newlines with all
these (otherwise the next log starts on the same line which looks odd).

I removed the cache clean as well because the cache is meant to stay
there to speed up builds.
2021-12-07 17:38:03 -06:00
Teffen 3157a40044
Fix issues surrounding initial web server load. (#4509)
- Clean up watcher behaviors.
2021-11-19 16:03:40 -05:00
Asher cd26f84bc6
Fix watcher not restarting code-server on VS Code compilation (#4520)
The "Starting watch-client" string no longer appears in the latest build
output.  We could look for "Finished compilation with" to avoid
restarting when other tasks restart (since they also include the name
i.e. "Finished compilation extensions with 0 errors") but I figure we
might as well restart code-server when any compilation task completes in
case other tasks include changes that need to be reloaded.
2021-11-16 16:21:14 -06:00
Jinu ccb9d948c0
fix NOTE.txt (#4515) 2021-11-16 09:46:39 -07:00
Jinu cdf0deb534
fix volumes (#4497) 2021-11-12 10:10:47 -07:00
Teffen 1b60ef418c
Use upstream server (#4414)
* Flesh out fixes to align with upstream.

* Update route handlers to better reflect fallback behavior.

* Add platform to vscode-reh-web task

Our strategy has been to build once and then recompile native modules
for individual platforms.  It looks like VS Code builds from scratch for
each platform.

But we can target any platform, grab the pre-packaged folder, then
continue with own packaging.

In the future we may want to rework to match upstream.

* Fix issue where workspace args are not parsed.

* Fix issues surrounding opening files within code-server's terminal.

* Readd parent wrapper for hot reload.

* Allow more errors.

* Fix issues surrounding Coder link.

* Add dir creation and fix cli

It seems VS Code explodes when certain directories do not exist so
import the reh agent instead of the server component since it creates
the directories (require patching thus the VS Code update).

Also the CLI (for installing extensions) did not seem to be working so
point that to the same place since it also exports a function for
running that part of the CLI.

* Remove hardcoded VSCODE_DEV=1

This causes VS Code to use the development HTML file.  Move this to the
watch command instead.

I deleted the other stuff before it as well since in the latest main.js
they do not have this code so I figure we should be safe to omit it.

* Fix mismatching commit between client and server

* Mostly restore command-line parity

Restore most everything and remove the added server arguments.  This
will let us add and remove options after later so we can contain the
number of breaking changes.

To accomplish this a hard separation is added between the CLI arguments
and the server arguments.

The separation between user-provided arguments and arguments with
defaults is also made more clear.

The extra directory flags have been left out as they were buggy and
should be implemented upstream although I think there are better
solutions anyway.  locale and install-source are unsupported with the
web remote and are left removed.  It is unclear whether they were used
before anyway.

Some restored flags still need to have their behavior re-implemented.

* Fix static endpoint not emitting 404s

This fixes the last failing unit test.

Fix a missing dependency, add some generic reverse proxy support for the
protocol, and add back a missing nfpm fix.

* Import missing logError

* Fix 403 errors

* Add code-server version to about dialog

* Use user settings to disable welcome page

The workspace setting seems to be recognized but if so it is having no
effect.

* Update VS Code cache step with new build directories

Co-authored-by: Asher <ash@coder.com>
2021-11-09 23:28:31 -06:00
Matthew Beckett 94b2774f8c
Drop duplicate Helm values from values.yaml (#4450)
* Drop duplicate Helm values from values.yaml

* Use frozen lockfile for test dependencies in CI (#4442)

* Use frozen lockfile for test dependencies in CI

This might be causing more Playwright issues.

* Bump Playwright

Mostly just to trigger a reinstall of dependencies since it is cached
and still failing.

Once updated it errors saying install needs to run so add that too.

* Drop duplicate Helm values from values.yaml

Co-authored-by: Asher <ash@coder.com>
2021-11-05 12:04:52 -07:00
Asher 03651e5e0b
Use frozen lockfile for test dependencies in CI (#4442)
* Use frozen lockfile for test dependencies in CI

This might be causing more Playwright issues.

* Bump Playwright

Mostly just to trigger a reinstall of dependencies since it is cached
and still failing.

Once updated it errors saying install needs to run so add that too.
2021-11-04 11:39:27 -05:00
Joe Previte 219cad1783
Revert "Add linkup command to improve link functionality" (#4439)
This reverts commit 2504f6fce4.
2021-11-03 14:42:14 -07:00
Joe Previte 705e821741
fix(testing): revert change & fix playwright tests (#4310)
* fix(testing): revert change & fix playwright tests

* fix(constants): add type to import statement

* refactor(e2e): delete browser test

This test was originally added to ensure playwright was working.

At this point, we know it works so removing this test because it doesn't help
with anything specific to code-server and only adds unnecessary code to the
codebase plus increases the e2e test job duration.

* chore(e2e): use 1 worker for e2e test

I don't know if it's a resources issue, playwright, or code-server but it seems
like the e2e tests choke when multiple workers are used.

This change is okay because our CI runner only has 2 cores so it would only use
1 worker anyway, but by specifying it in our playwright config, we ensure more
stability in our e2e tests working correctly.

See these PRs:
- https://github.com/cdr/code-server/pull/3263
- https://github.com/cdr/code-server/pull/4310

* revert(vscode): add missing route with redirect

* chore(vscode): update to latest fork

* Touch up compilation step.

* Bump vendor.

* Fix VS Code minification step

* Move ClientConfiguration to common

Common code must not import Node code as it is imported by the browser.

* Ensure lib directory exists before curling

cURL errors now because VS Code was moved and the directory does not
exist.

* Update incorrect e2e test help output

Revert workers change as well; this can be overridden when desired.

* Add back extension compilation step

* Include missing resources in release

This includes a favicon, for example.  I opted to include the entire
directory to make sure we do not miss anything.  Some of the other
stuff looks potentially useful (like completions).

* Set quality property in product configuration

When httpWebWorkerExtensionHostIframe.html is fetched it uses the web
endpoint template (in which we do not include the commit) but if the
quality is not set it prepends the commit to the web endpoint instead.
The new static endpoint does not use/handle commits so this 404s.

Long-term we might want to make the new static endpoint use commits like
the old one but we will also need to update the various other static
URLs to include the commit.

For now I just fixed this by adding the quality since:
  1. Probably faster than trying to find and update all static uses.
  2. VS Code probably expects it anyway.
  3. Gives us better control over the endpoint.

* Update VS Code

This fixes several build issues.

* Bump vscode.

* Bump.

* Bump.

* Use CLI directly.

* Update tests to reflect new upstream behavior.

* Move unit tests to after the build

Our code has new dependencies on VS Code that are pulled in when the
unit tests run.  Because of this we need to build VS Code before running
the unit tests (as it only pulls built code).

* Upgrade proxy-agent dependencies

This resolves a security report with one of its dependencies (vm2).

* Symlink VS Code output directory before unit tests

This is necessary now that we import from the out directory.

* Fix issues surrounding persistent processes between tests.

* Update VS Code cache directories

These were renamed so the cached paths need to be updated.  I changed
the key as well to force a rebuild.

* Move test symlink to script

This way it works for local testing as well.

I had to use out-build instead of out-vscode-server-min because Jest
throws some obscure error about a handlebars haste map.

* Fix listening on a socket

* Update VS Code

It contains fixes for missing files in the build.

* Standardize disposals

* Dispose HTTP server

Shares code with the test HTTP server.  For now it is a function but
maybe we should make it a class that is extended by tests.

* Dispose app on exit

* Fix logging link errors

Unfortunately the logger currently chokes when provided with error
objects.

Also for some reason the bracketed text was not displaying...

* Update regex used by e2e to extract address

The address was recently changed to use URL which seems to add a
trailing slash when using toString, causing the regex match to fail.

* Log browser console in e2e tests

* Add base back to login page

This is used to set cookies when using a base path.

* Remove login page test

The file this was testing no longer exists.

* Use path.posix for static base

Since this is a web path and not platform-dependent.

* Add test for invalid password

Co-authored-by: Teffen Ellis <teffen@nirri.us>
Co-authored-by: Asher <ash@coder.com>
2021-10-28 15:27:17 -05:00
Joe Previte 1dfcd0448e
Merge pull request #4273 from cdr/jsjoeio-bump-helm-chart
chore(helm-chart): bump to 1.0.5
2021-10-01 11:10:21 -07:00
Teffen Ellis d8c344beda Refactor vscode endpoints to use fork directly. 2021-09-30 19:14:17 -04:00
Teffen Ellis beebf53adc Add linkup command to improve link functionality 2021-09-30 19:14:17 -04:00
Joe Previte d54b4accac
fix 2021-09-29 14:39:48 -07:00
Joe Previte 5e7b419820
chore: bump helm-chart version to 1.0.5
We've had two patches to the helm-chart since the last time we bumped the Chart
version.

- 1ffca5751c
- 5a36627aae

This version bump ensures that chart version has the correct date.
2021-09-29 14:38:13 -07:00
Joe Previte 8ef950af4c
feat(brew-bump): add check for cleanup step 2021-09-28 16:07:01 -07:00
Joe Previte e5f03e0b06
fix: add checks and handle errors brew-bump.sh
feat(script): add steps-lib, is_env_var_set & test

feat(brew-bump): add check for VERSION

feat(brew-bump): check HOMEBREW_GITHUB_API_TOKEN

feat(steps-lib): add directory_exists helper fn

fix(brew-bump): check that git clone worked

feat(brew-bump): add check for remote upstream

fix: remove upstream command thing

feat(steps-lib): add file_exists helper function

feat(brew-bump): add check for git-askpass.sh

feat(steps-lib): add is_executable function & test

feat(brew-bump): add check for is_executable

refactor: use GIT_ASKPASS as variable
2021-09-28 16:06:57 -07:00
jlandowner 5a36627aae Use Ingress v1 from k8s v1.19 2021-09-25 23:07:06 +09:00
Joe Previte 014faf5b1c
feat: use sh in postinstall in build-release.sh 2021-09-23 11:41:51 -07:00
Joe Previte 1f95a23d1d
Revert "fix: run postinstall script explicitly with bash (#4116)"
This reverts commit b32b4edf3d.

We are reverting this because we found out that while this fixes the postinstall
on Windows, it breaks it on mac and other devices.  See:
https://github.com/cdr/code-server/issues/3874#issuecomment-925397980
2021-09-23 10:44:37 -07:00
Joe Previte 6a692487c8
feat: add test for get_nfpm_arch 2021-09-17 16:07:03 -07:00
Teffen Ellis 3c61d96d4f Bump vscode.
- Fix issue where yarn lock cannot be updated in development.
2021-09-16 20:55:51 -04:00
Asher b37ff28a0a Export NFPM_CONFIG (#4187)
Otherwise envsubst does not have access to it.

Also print the nfpm config head for debugging.
2021-09-16 19:59:37 +00:00
Teffen Ellis 798dc0baf2 chore(release): bump version to 3.12.0 2021-09-15 15:54:06 -04:00
Teffen Ellis f885b29675 Add vscode via vendor package.
- Use yarn for vscode vendoring.
- Grab hash from package.
2021-09-15 14:54:33 -04:00
Joe Previte d650894eb5
Revert "Revert "refactor: move helm README to docs/helm.md""
This reverts commit f319fca291.
2021-09-13 14:16:47 -07:00
Asher 7a735014bb
Push latest Docker tag along with version tag (#4120) 2021-09-08 15:00:34 -05:00
Max b32b4edf3d
fix: run postinstall script explicitly with bash (#4116)
Currently, Windows default script-shell (cmd) fails to run the postinstall script. This commit fixes the problem by running postinstall.sh explicitly with the default bash executable of the OS.

Related: #1397
2021-09-08 11:11:20 -05:00
Stefano Dissegna 0529f52b9d compile extensions media 2021-09-07 23:15:46 +00:00
Joe Previte f319fca291
Revert "refactor: move helm README to docs/helm.md"
This reverts commit bc3fb5e22f.
2021-08-25 12:02:39 -07:00
Joe Previte bc3fb5e22f refactor: move helm README to docs/helm.md 2021-08-25 09:04:26 -04:00
Jonathan Yu ea1b3a7245
chore: add example for parameter/value to Helm Values (#4020) 2021-08-24 15:30:04 -07:00
Renovate Bot 234b8ade59
chore(deps): update debian docker tag to v11 2021-08-17 03:11:47 +00:00
Joe Previte bffb009ecd
fix: add symlink to npmignore 2021-08-11 13:49:25 -07:00
Joe Previte ff3b976df8
Revert "Merge pull request #3935 from cdr/jsjoeio-rm-symlink"
This reverts commit 5049447225, reversing changes
made to 741b834b64.

We still need the symlink for the standlone packages which means we need to redo
how the symlink is removed, ensuring it's only removed in the npm package.
2021-08-10 11:59:03 -07:00
Joe Previte 9d8365913f
fix: remove symlink_asar from build-release step 2021-08-09 11:55:06 -07:00
Akash Satheesan 741b834b64
feat(ci): armv7 cross builds (#3892) 2021-08-10 00:05:31 +05:30
Joe Previte 911af4075f
chore(release): bump version to 3.11.1 2021-08-06 12:17:30 -07:00
Asher afb8662d4d
Query artifacts by branch name (#3881)
This way workflows will still work even if there have been enough runs
to push the version branch run off the first page.
2021-07-30 18:32:22 +00:00
Joe Previte 7e43f7d6b0
Merge pull request #3866 from cdr/jsjoeio-reorg-test-files
refactor: clean up test file structure
2021-07-29 15:14:37 -07:00
Akash Satheesan 93c89ba0e8
fix(ci): build+push image in release flow (#3838) 2021-07-29 23:31:46 +05:30
Joe Previte 7a6ec202ba
refactor: match /test/unit structure to /src 2021-07-29 09:48:40 -07:00
Asher 589982f027
Fix incorrect manifest build
I mistakenly thought they were for each arch but it's for the version
and latest which makes a *lot* more sense.
2021-07-16 18:25:54 -05:00
Asher 9ef6680adc
Fix incorrect version var in artifact script 2021-07-16 17:39:53 -05:00
Asher a32df56f99
Skip Docker if already pushed 2021-07-16 17:39:52 -05:00
Asher 4cfa384bb4
Skip brew if already published 2021-07-16 17:39:51 -05:00