0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00
denoland-deno/cli/tools
Bartek Iwańczuk 631e175498
fix(upgrade): return no RC versions if fetching fails (#25013)
This commit fixes errors on CI like this:
```
---- upgrade::upgrade_prompt stdout ----
command /home/runner/work/deno/deno/target/release/deno run --log-level=debug main.js
command cwd /tmp/deno-cli-testqDw5UR
command /home/runner/work/deno/deno/target/release/deno run --log-level=debug main.js
command cwd /tmp/deno-cli-testqDw5UR
------ Start Full Text ------
"DEBUG RS - deno::args:620 - No .npmrc file found\r\nDEBUG RS - deno::args:909 - Finished config loading.\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/dep_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/node_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/v8_code_cache_v2...\r\nDEBUG RS - deno::js:10 - Deno isolate init with snapshots.\r\nDEBUG RS - deno::worker:183 - main_module file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:158 - Preparing module load.\r\nDEBUG RS - deno::module_loader:162 - Building module graph.\r\nDEBUG RS - deno::file_fetcher:573 - FileFetcher::fetch_no_follow_with_options - specifier: file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:208 - Prepared module load.\r\nDEBUG RS - deno_runtime::worker:739 - received module evaluate Ok(\r\n    (),\r\n)\r\nDEBUG RS - deno::module_loader:831 - Updating V8 code cache for ES module: file:///tmp/deno-cli-testqDw5UR/main.js, [1577979522354460122]\r\n"
------- End Full Text -------
Next text: "DEBUG RS - deno::args:620 - No .npmrc file found\r\nDEBUG RS - deno::args:909 - Finished config loading.\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/dep_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/node_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/v8_code_cache_v2...\r\nDEBUG RS - deno::js:10 - Deno isolate init with snapshots.\r\nDEBUG RS - deno::worker:183 - main_module file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:158 - Preparing module load.\r\nDEBUG RS - deno::module_loader:162 - Building module graph.\r\nDEBUG RS - deno::file_fetcher:573 - FileFetcher::fetch_no_follow_with_options - specifier: file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:208 - Prepared module load.\r\nDEBUG RS - deno_runtime::worker:739 - received module evaluate Ok(\r\n    (),\r\n)\r\nDEBUG RS - deno::module_loader:831 - Updating V8 code cache for ES module: file:///tmp/deno-cli-testqDw5UR/main.js, [1577979522354460122]\r\n"
thread 'upgrade::upgrade_prompt' panicked at tests/integration/upgrade_tests.rs:251:9:
Timed out.
```

These errors are caused by the fact that the test server doesn't have an
endpoint to return
RC releases. Which in turn causes an error to be raised which later just
short-circuits logic
for checking the version and storing it in file. Since fetching from a
remote host is always
fallible I elected to just return an empty vec of "rc" versions instead
of erroring. This might
lead to a slight mismatch in some situation when the request actually
failed and user is
prompted that there's a new canary version, but that is better than not
displaying
prompt at all. This issue will be fixed more robustly once we move to
using SUI for
specifying version of the binary.
2024-08-12 23:44:14 +00:00
..
bench fix(upgrade): do not error if config in cwd invalid (#24689) 2024-07-23 19:00:48 -04:00
coverage fix(upgrade): do not error if config in cwd invalid (#24689) 2024-07-23 19:00:48 -04:00
init feat: deno init --serve (#24897) 2024-08-08 16:54:39 +00:00
jupyter fix: adapt to new jupyter runtime API and include session IDs (#24762) 2024-07-27 10:39:08 +02:00
lint fix(compile): support workspace members importing other members (#24909) 2024-08-07 07:43:05 +00:00
registry feat: deno remove (#24952) 2024-08-12 16:17:25 -04:00
repl docs: fix typos (#24820) 2024-08-02 13:26:54 +02:00
run feat: Rename --unstable-hmr to --watch-hmr (#24975) 2024-08-12 00:10:55 +02:00
test chore: upgrade to rust 1.80 (#24778) 2024-07-29 12:58:04 -04:00
vendor fix(compile): support workspace members importing other members (#24909) 2024-08-07 07:43:05 +00:00
bundle.rs fix(upgrade): do not error if config in cwd invalid (#24689) 2024-07-23 19:00:48 -04:00
check.rs feat: npm workspace and better Deno workspace support (#24334) 2024-07-04 00:54:33 +00:00
compile.rs docs: fix typos (#24820) 2024-08-02 13:26:54 +02:00
doc.rs fix: update deno_doc (#24972) 2024-08-12 12:57:50 -07:00
fmt.rs feat(fmt): support CSS, SCSS, Sass and Less (#24870) 2024-08-09 18:52:23 +02:00
info.rs fix(upgrade): do not error if config in cwd invalid (#24689) 2024-07-23 19:00:48 -04:00
installer.rs fix(add): Better error message when missing npm specifier (#24970) 2024-08-09 14:29:11 +00:00
mod.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
task.rs feat: deno run <task> (#24891) 2024-08-06 20:35:30 +05:30
upgrade.rs fix(upgrade): return no RC versions if fetching fails (#25013) 2024-08-12 23:44:14 +00:00