Commit Graph

254 Commits

Author SHA1 Message Date
Josh Spicer
6cc2564bf9 remote: configurable 'reconnection grace time' (#274910)
* reconnection grace period prototype

* plumb through CLI

* polish

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 18:51:28 -08:00
Josh Spicer
b96e6d762c allow update endpoint in rs cli to be configurable by env var (#276761) 2025-11-11 10:23:39 -08:00
Justin Wang
b0271fa725 Fix --commit-id flag for code serve-web (#258904)
* Fix --commit-id flag for code serve-web

Fixes a bug where passing --commit-id during `code serve-web` would
prevent serve-web from downloading a new version of the client at all.

* Update cli/src/commands/serve_web.rs

---------

Co-authored-by: Connor Peet <connor@peet.io>
2025-07-31 16:52:39 +00:00
Copilot
90072b47cf Fix serve-web port randomization when --port 0 is specified (#254676)
* Initial plan

* Fix serve-web port randomization when --port 0 is specified

Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>

* Fix serve-web to display actual bound port instead of 0

When --port 0 is specified, the OS assigns a random port but the
logging was showing port 0 instead of the actual assigned port.
Fixed by reading the local_addr() from the server builder after binding.

Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
2025-07-22 13:35:24 -07:00
Justin Wang
b4d1fec915 Add commit_id option to ServeWebArgs for specific client version (#255494)
* Add commit_id option to ServeWebArgs for specific client version

* Don't start serve-web update checker if given commit-id
2025-07-14 06:12:36 +00:00
S. M. Mohiuddin Khan Shiam
70f8e0e38f Fix incorrect SHA-1 commit regex in [version_manager.rs](cci:7://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:0:0-0:0) (#251329)
The CLI’s `RequestedVersion::Commit` parser rejected many valid commit hashes and allowed invalid ones due to an erroneous regular expression:

* **Old pattern:** `^[a-e0-f]{40}$`
  * Allowed non-hex characters outside the `a–f` range
  * Excluded the valid hex digit `f` and any uppercase letters
* **New pattern:** [(?i)^[0-9a-f]{40}$](cci:1://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:102:1-107:2)
  * [(?i)](cci:1://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:102:1-107:2) enables case-insensitive matching (accepts `A–F`)
  * Character class now correctly restricts input to hexadecimal digits `0-9` and `a-f`
  * Ensures the string is exactly 40 characters, matching a valid SHA-1

#### Impact

`code version use <commit>` and related commands could silently fail or accept malformed commit IDs, leading to unexpected version resolution behavior.
With this fix, only valid 40-character hexadecimal commit hashes are accepted, restoring reliable version selection and preventing subtle bugs.

#### Notes

No API changes; the fix is a single-line update in [cli/src/desktop/version_manager.rs](cci:7://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:0:0-0:0).
2025-06-13 15:40:55 +00:00
Robo
6947b69d47 fix: revert remote libcxx requirement to 3.4.25 (#248976)
* fix: revert libcxx requirement to 3.4.25

* ci: temp debugging

* fix: use gcc 8.5.0 for remote

* ci: update cache

* ci: fix sysroot directory

* ci: fix objdump directory
2025-05-14 20:10:32 -07:00
Robo
12326f9906 chore: update to Electron 35 (#245423)
* chore: bump electron@35.0.1

* chore: update types/node@22.x

* chore: update web types for node v22.x

* chore: bump electron@35.1.2

* chore: update node.js build

* chore: update app.dock usage

Refs 71f3ff6bf2

* chore: bump electron@35.1.4

* chore: bump electron@35.1.5

* ci: bump sysroot to glibc 2.28 and gcc 10.5.0

* ci: enable timeout for smoketests

* chore: bump min glibcxx to 3.4.26 for server

* Revert "ci: enable timeout for smoketests"

This reverts commit afb637e85d.

* chore: update debian dependencies

* fix: workaround npm.ps1 argument parsing with powershell

* chore: update rpm dependencies

* test: partially revert changes from 242535

* test: remove redudant keybinding dispatch for selectTab

* test: fix test failure from running configured tasks

* test: focus settings editor for preferences.test.ts

* node - adopt compile cache (#246835)

* node - adopt compile cache

* adopt for utility process

* tweaks

* log state of compilation cache

* Revert "log state of compilation cache"

This reverts commit f3840387a583013834762e2c44f6e8424929297f.

* Revert "node - adopt compile cache (#246835)"

This reverts commit 673a00cab66c9bac87f3cd27b80efa41c80150f1.

* chore: update builds

* chore: bump electron@35.2.0

* chore: bump electron@35.2.1

* chore: bump electron@35.2.2

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2025-05-09 19:03:36 +09:00
Robo
e9a3e2a03c fix: libc checks for exec server (#243254) 2025-03-11 12:54:24 -07:00
Robo
31ec1c528f build: remove legacy server support (#235232)
* build: remove legacy server support

* chore: update rpm dependencies

* chore: fix publishing

* cli: provide option for unsupported glibc sysroot

* chore: add unsupported mode to prereq check

* chore: add logging

* chore: add comment about patchelf execution order
2025-03-10 17:54:23 +01:00
Connor Peet
3331d2d87d chore: update to rust 1.85 (#242609) 2025-03-04 21:58:23 +01:00
M Hickford
c515f75608 Log provider in "tunnel user show" 2025-02-11 19:53:57 +00:00
Connor Peet
90e4da155a cli: remove unsupported arguments from serve-web (#239731)
Fixes #238303
2025-02-05 13:20:23 -08:00
Connor Peet
eee5e7643a cli: propagate server-data-dir and extensions-dir when installing service (#236734)
Fixes #236195
2024-12-20 10:29:40 -08:00
Connor Peet
3e86f1e6cd cli: fix serve-web needs to wait a certain amount of time after machine startup (#236427)
Fixes #233155
2024-12-18 01:38:47 +01:00
aslezar
386d58d0de fixed formattting error 2024-12-16 20:49:25 +05:30
aslezar
5c525a4d56 fixed formatting 2024-12-15 16:54:08 +05:30
aslezar
e044a71719 Fix incorrect GLIBC version parsing
Fixes #230370
2024-12-13 22:22:13 +05:30
Sandeep Somavarapu
4920694ece fix #234843 (#235955)
* fix #234843

* fix lint error
2024-12-12 16:48:37 +01:00
benshi
4e2855ff7f Cli serve_web sets the path prefix to /<quality>-<commit>/, commit value parsing error (#233986)
fix #233984
2024-11-17 04:34:54 +00:00
Sandeep Somavarapu
653fd419de #232043 revert cli command and support downloading VSIX in UI (#233843)
* Revert "fix #232043 (#233596)"

This reverts commit e9d6c6afc0.

* #232043 revert cli command and support downloading VSIX in UI
2024-11-14 15:41:28 +01:00
Connor Peet
c4efcbdfb4 cli: remove stray debug log (#233714) 2024-11-12 10:42:28 -08:00
Sandeep Somavarapu
e9d6c6afc0 fix #232043 (#233596)
* fix #232043

* fix compilation error

* fix compilation

* fix compilation

* fix compilation

* fix compilation

* fix compilation
2024-11-12 14:09:05 +01:00
Hamir Mahal
a744313eb7 style: simplify string formatting for readability (#231763)
* style: simplify string formatting for readability

* fix: formatting in `.rs` files in `src/`
2024-10-22 16:30:46 +00:00
Connor Peet
061cbf557f cli: add server-data-dir and extensions-dir on command-shell (#228287) 2024-09-12 17:06:42 +02:00
Connor Peet
4d221c6b85 cli: reapply "code server-web when offline" 2024-09-09 09:18:56 -07:00
Robo
746ba5bc68 cli: revert "code server-web when offline" (#227981)
* Revert "Merge pull request #227830 from microsoft/connor4312/cli-offline-serve"

This reverts commit 136a5c6f5f, reversing
changes made to 9d388bbf8b.

* chore: bump distro
2024-09-09 16:21:08 +02:00
Connor Peet
077bd2f1b4 fixups
- Don't set a config option for update interval. We don't let the one
  in core be configurable, don't see a huge need for this.
- Don't start the server when the update is available
- Fix some race conditions
- Fix some clippy lints on Rust 1.81
2024-09-06 12:20:13 -07:00
Ritam
b97dc79649 feat: serve-web now checks for update every 1 hour by default and can be configured by the flag "update_check_interval" 2024-08-25 16:10:27 +05:30
Ritam
785aaa3fdf refactor: moved the cli serve-web cache seeding to ConnectionManager initialization from get_latest_release 2024-08-15 18:55:06 +05:30
Ritam
2ed4fb19e6 Merge branch 'main' into cli-serve-web-offline-use-cache 2024-08-15 15:41:53 +05:30
Robo
1835a67cb6 ci: publish win32 arm64 server (#224929) 2024-08-06 14:57:22 +02:00
Connor Peet
fcfd4be5b8 cli: determine archive type based on filename instead of path (#224602)
Refs #219632

Seems like PRSS sometimes(?) doesn't return the full archive name in
the response. I don't reproduce this, but others consistently do. This
PR removes the dependency on the URL path and instead checks for the
gzip magic number in the first two bytes of the archive to figure out
what to do.
2024-08-02 09:34:11 -07:00
Connor Peet
e59d6aee71 cli: allow listening on range of ports (#223953)
* cli: allow listening on range of ports

For https://github.com/microsoft/vscode-remote-release/issues/10043

* clippy lint
2024-07-26 13:36:36 -07:00
Connor Peet
b6d022bc08 fix: --connection-token-file not functional in "code serve-web" (#223524)
Fixes #215537
2024-07-24 10:36:49 -07:00
Robo
cab98a1ca8 fix: bump minimum glibcxx version for armhf remote server (#221259) 2024-07-10 08:04:46 +09:00
Snoppy
8d54ffc9f6 chore: fix typos (#216562)
Signed-off-by: snoppy <michaleli@foxmail.com>
2024-06-27 20:01:19 +00:00
Connor Peet
03d781a755 cli: fix closing incorrectly if updated failed (#215595) 2024-06-15 00:54:51 +02:00
Connor Peet
aef8e26d88 serve-web: fix SECRET_KEY_MINT_PATH does not honour server-base-path (#214250)
Fixes #212369
2024-06-04 09:57:17 -07:00
Connor Peet
54dd0ecc65 forwarding: make https work for port forwarding (#213943)
Closes https://github.com/microsoft/vscode/issues/201465
2024-05-30 21:42:51 -07:00
Connor Peet
ebeb99b8f2 Connor4312/issue211378 (#213829)
cli: fix inverted condition not showing warning correctly

Fixes #211378
2024-05-29 18:50:34 +02:00
Ritam Mukherjee
bc5e7b51a2 refactor: removed unnecessary check for empty vector in DownloadCache load 2024-05-22 23:05:10 +05:30
Ritam Mukherjee
23f2247b72 refactor: fix clippy let-and-return error in linting 2024-05-22 22:33:16 +05:30
Ritam Mukherjee
3de59fcc49 feat: allows cli to serve locally cached server when update service not available 2024-05-22 21:03:54 +05:30
Connor Peet
eb99b85bdf chore: update CLI dependences, add env var options for login 2024-05-20 08:33:23 -07:00
Connor Peet
e3d04f279f cli: support refresh token in tunnel user login (#212106) 2024-05-06 18:47:37 +02:00
Connor Peet
0f2b535662 cli: automatically remove servers that fail to start (#211500)
Fixes https://github.com/microsoft/vscode-remote-release/issues/9823
2024-04-27 06:54:06 -07:00
Connor Peet
60bd03a02e cli: fix tunnels not working on Windows (#211498)
I made a change this past iteration to use `CREATE_BREAKAWAY_FROM_JOB`
in order to allow the code-server process to outlive SSH connections run
from the exec server.

However, it appears that this _can_ break things if it's run from a job
that doesn't have the JOB_OBJECT_LIMIT_BREAKAWAY_OK flag set. I'm not
a winapi expert, so this is a simple though perhaps inefficient change
to probe whether we can do this via an echo command before starting the
server.
2024-04-27 01:38:38 +02:00
Connor Peet
233775583c cli: warn when cli options are not applied (#211492)
Fixes #211378
2024-04-26 15:23:02 -07:00
Connor Peet
85178f0fb4 cli: bubble error from setup to the remote server (#210967)
cli: bubble error from setup to the remote server logs
2024-04-22 23:57:44 +02:00