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

Frequent 'Unable to initialize IDE' error on AWS #4352

Merged
merged 3 commits into from
Mar 13, 2017
Merged

Frequent 'Unable to initialize IDE' error on AWS #4352

merged 3 commits into from
Mar 13, 2017

Conversation

kaloyan-raev
Copy link
Contributor

@kaloyan-raev kaloyan-raev commented Mar 8, 2017

What does this PR do?

Fixes an issue with the 'Unable to initialize IDE' error when loading the Web IDE.

The issue is caused by a race condition. The LanguageServerFileTypeRegister.start() method might be called before the call to the OrionEditorExtension constructor. Thus when the execution reaches the EditorInitializePromiseHolder.getInitializerPromise() method, the initializerPromise is still null throwing a RuntimeException and failing the Web IDE initialization.

The PR refactors the code to avoid this situation.

What issues does this PR fix or reference?

Frequent 'Unable to initialize IDE' error on AWS #4288

Changelog

Fixed issue with an 'Unable to initialize IDE' error when loading the Web IDE.

Release Notes

N/A

Docs PR

N/A

Signed-off-by: Kaloyan Raev kaloyan.r@zend.com

Move the logic for injecting the Orion editor from the
OrionEditorExtension class to the EditorInitializerPromiseHolder. Thus
avoiding the chance for having the initializePromise field with null
value.
If injected multiple times, eventually, the last one may be injected
*after* the orion-codenvy-theme.css stylesheet. Thus causing issues to
theming the code editor.
@codenvy-ci
Copy link

Can one of the admins verify this patch?

@TylerJewell TylerJewell added kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. labels Mar 8, 2017
@TylerJewell
Copy link

This would be a huge find and fix. @kaloyan-raev - did you commit with the right email address that has a CLA?

@kaloyan-raev
Copy link
Contributor Author

I think I forgot to hit the sign-off button... Let me check if I can simply amend another commit with the sign-off.

Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
@TylerJewell
Copy link

I've asked Vitalii and Dmitry Kuleshov to do a review of this in the next sprint. I think this is something that we should not wait on.

@vparfonov vparfonov added this to the 5.5.0 milestone Mar 13, 2017
@vparfonov vparfonov merged commit e74cf00 into master Mar 13, 2017
@vparfonov vparfonov deleted the CHE-4288 branch March 13, 2017 11:11
@JamesDrummond JamesDrummond mentioned this pull request Mar 17, 2017
9 tasks
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
* CHE-4288: Frequent 'Unable to initialize IDE' error on AWS

Move the logic for injecting the Orion editor from the
OrionEditorExtension class to the EditorInitializerPromiseHolder. Thus
avoiding the chance for having the initializePromise field with null
value.

* Ensure built-codeEdit.css is injected only once

If injected multiple times, eventually, the last one may be injected
*after* the orion-codenvy-theme.css stylesheet. Thus causing issues to
theming the code editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants