eclipse-theia / vscode-builtin-extensions

Built-in VS Code extensions for Theia
Other
67 stars 36 forks source link

Little improvements #119

Closed marcdumais-work closed 1 year ago

marcdumais-work commented 1 year ago

Two main improvements are contained in this PR, each have their commit since not directly related.

Improve version:isPublished()

I think what's there technically worked but this is cleaner

[publish] Set builtinQueue concurrency to 1

It might result in slightly slower publish because extensions will be published sequentially (previously it was 4 in parallel), but I think it's safer this way. When we publish several extensions at the same time, error handling is tricky.

For example: in publish-vsix.js line 87, we call ovsx.publish(). In most error cases, except if an extension is already published, it will throw. In the catch() block line 100, we re-throw, causing the script to immediately exit with an error status.

Should the above happen in the middle of publishing, it could potentially affect up-to 3 other extensions that were being published in parallel. It seems that it could result in e.g. partially uploaded extensions, and some publish being abandoned without being completed.

Hopefully, such cases are handled well by the server, but better to not provoke them when possible.