- Notifications
You must be signed in to change notification settings - Fork1
fix: report errors while running actions#193
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
JetBrains team reported in the past a couple of errors in the log, one of thembeing `A workspace build is already active`. The issue can be reproduced if the userhits the `Stop` action for example quite quick. It takes maybe one or two secondsto make rest api request, then for the backend to enqueue the build and change theworkspace action. If we hit the action buttons really fast then this error could bereproduced.One approach I tried was to disable the action buttons in the context menu for the durationthe request is executed. But for some reason the "enabled" property is not working in contextmenu, only when the actions are rendered on a UI "page".Instead, I decided to refactor the existing code and (also) visually report the errors in theUI screen to make the user aware in some cases that a job is already running on the backend.
Another error reported by JetBrains is a `RejectedExecutionException` in the rest api client,and from the stack trace it seems the thread pool in the rest client was at some point shutdown.I think it is some sort of race condition, some thread calling shutting down the rest api clientwhile the UI thread still executes polling and user's action. I tried to reproduce the issue withno success, and so I'm improving the logging around plugin de-initialization in the hope that nexttime the sequence of events is more helpful.
jcjiang left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The changes you made around improving logging and visually displaying errors make sense. Could still be helpful to get thoughts from an engineer, but I approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good!
3867a15
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
JetBrains team reported in the past a couple of errors in the log, one of them being
A workspace build is already active
. The issue can be reproduced if the user hits theStop
action for example quite quick. It takes maybe one or two seconds to make rest api request, then for the backend to enqueue the build and change the workspace action. If we hit the action buttons really fast then this error could be reproduced.One approach I tried was to disable the action buttons in the context menu for the duration the request is executed. But for some reason the "enabled" property is not working in context menu, only when the actions are rendered on a UI "page".
Instead, I decided to refactor the existing code and (also) visually report the errors in the UI screen to make the user aware in some cases that a job is already running on the backend.
Another error reported by JetBrains is a
RejectedExecutionException
in the rest api client, and from the stack trace it seems the thread pool in the rest client was at some point shutdown.I think it is some sort of race condition, some thread calling shutting down the rest api client while the UI thread still executes polling and user's action. I tried to reproduce the issue with no success, and so I'm improving the logging around plugin de-initialization in the hope that next time the sequence of events is more helpful.