Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download-plugins: display errors at the end of the script #7881

Merged
merged 1 commit into from
May 26, 2020

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes #7878

The following commit updates the download:plugins script to display errors (download failures) at the end of the script so application developers can easily see the failed downloads together.

How to test

  1. update the root's package.json to include bogus download links
  2. perform yarn download:plugins
  3. the errors should be displayed at the end of the script:
Example
┌─[±][vf/gh-7878 U:1 ✗][theia][]
└─▪ yarn download:plugins
yarn run v1.22.4
$ theia download:plugins
--- downloading plugins ---
+ vscode-builtin-clojure: downloaded successfully 
+ vscode-builtin-csharp: downloaded successfully 
+ vscode-builtin-fsharp: downloaded successfully 
+ vscode-builtin-css: downloaded successfully 
+ vscode-builtin-debug-auto-launch: downloaded successfully 
+ vscode-builtin-bat: downloaded successfully 
+ vscode-builtin-configuration-editing: downloaded successfully 
+ vscode-builtin-grunt: downloaded successfully 
+ vscode-builtin-hlsl: downloaded successfully 
+ vscode-builtin-cpp: downloaded successfully 
+ vscode-builtin-coffeescript: downloaded successfully 
+ vscode-builtin-json: downloaded successfully 
+ vscode-builtin-docker: downloaded successfully 
+ vscode-builtin-handlebars: downloaded successfully 
+ vscode-builtin-perl: downloaded successfully 
+ vscode-builtin-rust: downloaded successfully 
+ vscode-builtin-r: downloaded successfully 
+ vscode-builtin-razor: downloaded successfully 
+ vscode-builtin-pug: downloaded successfully 
+ vscode-builtin-python: downloaded successfully 
+ vscode-builtin-ruby: downloaded successfully 
+ vscode-builtin-shaderlab: downloaded successfully 
+ vscode-builtin-scss: downloaded successfully 
+ vscode-builtin-lua: downloaded successfully 
+ vscode-builtin-groovy: downloaded successfully 
+ vscode-builtin-objective-c: downloaded successfully 
+ vscode-builtin-ini: downloaded successfully 
+ vscode-builtin-log: downloaded successfully 
+ vscode-builtin-java: downloaded successfully 
+ vscode-builtin-go: downloaded successfully 
+ vscode-builtin-powershell: downloaded successfully 
+ vscode-builtin-less: downloaded successfully 
+ vscode-builtin-make: downloaded successfully 
+ vscode-builtin-shellscript: downloaded successfully 
+ vscode-builtin-theme-kimbie-dark: downloaded successfully 
+ vscode-builtin-typescript: downloaded successfully 
+ vscode-builtin-sql: downloaded successfully 
+ vscode-builtin-theme-abyss: downloaded successfully 
+ vscode-builtin-theme-solarized-dark: downloaded successfully 
+ vscode-builtin-theme-monokai-dimmed: downloaded successfully 
+ vscode-builtin-theme-red: downloaded successfully 
+ vscode-builtin-swift: downloaded successfully 
+ vscode-builtin-theme-tomorrow-night-blue: downloaded successfully 
+ vscode-builtin-theme-monokai: downloaded successfully 
+ vscode-builtin-theme-quietlight: downloaded successfully 
+ vscode-builtin-xml: downloaded successfully 
+ vscode-builtin-markdown: downloaded successfully 
+ vscode-builtin-theme-defaults: downloaded successfully 
+ vscode-builtin-yaml: downloaded successfully 
+ vscode-editorconfig: downloaded successfully 
+ vscode-builtin-vb: downloaded successfully 
+ vscode-builtin-jake: downloaded successfully 
+ vscode-builtin-node-debug: downloaded successfully 
+ vscode-builtin-icon-theme-seti: downloaded successfully 
+ vscode-eslint: downloaded successfully 
+ vscode-builtin-node-debug2: downloaded successfully 
+ vscode-builtin-npm: downloaded successfully 
+ vscode-builtin-emmet: downloaded successfully 
+ vscode-references-view: downloaded successfully 
+ vscode-builtin-markdown-language-features: downloaded successfully 
+ vscode-builtin-typescript-language-features: downloaded successfully 
x vscode-builtin-html: failed to download with: 404 Not Found
x vscode-builtin-gulp: failed to download with: 404 Not Found
x vscode-builtin-merge-conflict: failed to download with: 404 Not Found
x vscode-builtin-javascript: failed to download, last error:
 FetchError: request to https://aopen-vsx.org/api/vscode/javascript/1.44.2/file/vscode.javascript-1.44.2.vsix failed, reason: getaddrinfo ENOTFOUND aopen-vsx.org aopen-vsx.org:443
✨  Done in 8.67s.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

This commit updates the `download-plugins` script to display error
messages (failures) at the end of the script.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto vince-fugnitto added the theia-cli issues related to the theia-cli label May 25, 2020
@vince-fugnitto vince-fugnitto requested a review from lmcbout May 25, 2020 14:19
@vince-fugnitto vince-fugnitto self-assigned this May 25, 2020
@lmcbout
Copy link
Contributor

lmcbout commented May 25, 2020

For some reasons, I introduce 3 errors in package.json, the second error did not show at the end , it showed in sequence of the download plugins, This error was a 404: (Change a file to a wrong file version)

  • vscode-builtin-coffeescript: downloaded successfully
    x jbvscodetest2: failed to download with: 404 Not Found
  • vscode-builtin-configuration-editing: downloaded successfully
  • vscode-builtin-csharp: downloaded successfully

The errors at the end were ":FetchError: request to https:...."

@vince-fugnitto
Copy link
Member Author

vince-fugnitto commented May 25, 2020

For some reasons, I introduce 3 errors in package.json, the second error did not show at the end , it showed in sequence of the download plugins, This error was a 404: (Change a file to a wrong file version)

  • vscode-builtin-coffeescript: downloaded successfully
    x jbvscodetest2: failed to download with: 404 Not Found
  • vscode-builtin-configuration-editing: downloaded successfully
  • vscode-builtin-csharp: downloaded successfully

The errors at the end were ":FetchError: request to https:...."

@lmcbout do you have steps to reproduce?

Screen Shot 2020-05-25 at 11 23 48 AM

@lmcbout
Copy link
Contributor

lmcbout commented May 25, 2020

Steps to reproduce:
1- Open package.json and in section "theiaPlugins:, introduce the following

line 1 (83):     "jbvscodetest1": "https://aopen-vsx.org/api/vscode/javascript/1.44.2/file/vscode.javascript-1.44.2.vsix",
 
line 6 (89):     "jbvscodetest2": "https://open-vsx.org/api/vscode/csharp/1.44.2/file/vscode.csharp-1.44.3.vsix",

line 19 (102):     "jbvscodetest3": "https://bbopen-vsx.org/api/vscode/javascript/1.44.2/file/vscode.javascript-1.44.2.vsix",

2- remove the plugins folder (rm -rf plugins)
3- Run the script: yarn download:plugins

@vince-fugnitto
Copy link
Member Author

Steps to reproduce:
1- Open package.json and in section "theiaPlugins:, introduce the following

line 1 (83):     "jbvscodetest1": "https://aopen-vsx.org/api/vscode/javascript/1.44.2/file/vscode.javascript-1.44.2.vsix",
 
line 6 (89):     "jbvscodetest2": "https://open-vsx.org/api/vscode/csharp/1.44.2/file/vscode.csharp-1.44.3.vsix",

line 19 (102):     "jbvscodetest3": "https://bbopen-vsx.org/api/vscode/javascript/1.44.2/file/vscode.javascript-1.44.2.vsix",

2- remove the plugins folder (rm -rf plugins)
3- Run the script: yarn download:plugins

@lmcbout it works for me, are you sure you checked out the branch and rebuilt @theia/cli?

Screen Shot 2020-05-25 at 11 27 57 AM

@lmcbout
Copy link
Contributor

lmcbout commented May 25, 2020

Let me rebuild a clean version and I will let you know

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a clean rebuild, it works fine, the errors are all grouped at the end.
Thanks @vince-fugnitto

@vince-fugnitto vince-fugnitto merged commit f75bd66 into master May 26, 2020
@vince-fugnitto vince-fugnitto deleted the vf/gh-7878 branch May 26, 2020 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theia-cli issues related to the theia-cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report errors at the end of a build instead of puting it anywhere
2 participants