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

Wait until plugin metadata processed #4834

Closed
wants to merge 2 commits into from
Closed

Conversation

evidolob
Copy link
Contributor

@evidolob evidolob commented Apr 8, 2019

This pull try to fix https://github.com/eclipse/che-theia/issues/101, that bug may be caused because we start server before PluginDeployer able to read and process plugins metadata, and if client connects in that time, he (client) will receive empty list of plugins. So this pull force Theia server to wait until all plugins are processed.

Signed-off-by: Yevhen Vydolob yvydolob@redhat.com

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob requested a review from benoitf as a code owner April 8, 2019 07:21
@akosyakov
Copy link
Member

@evidolob btw there is already PR for decorators #4827 could you have a look at it?

@akosyakov
Copy link
Member

Try to fix eclipse/che-theia#101, that bug may be caused because we start server before PluginDeployer able to read and process plugins metadata, and if client connects in that time, he (client) will receive empty list of plugins. So this pull force Theia server to wait until all plugins are processed.

Do you know how to reproduce it with some timeouts in the code?

@evidolob
Copy link
Contributor Author

evidolob commented Apr 8, 2019

I think yes, give me an our to create branch with timeouts

@akosyakov
Copy link
Member

@evidolob i would try to reproduce as well had something like that npm, grunt and gulp extensions installed together

@evidolob
Copy link
Contributor Author

evidolob commented Apr 8, 2019

@akosyakov I add sleep on doStart method, in this branch https://github.com/theia-ide/theia/tree/plugin-init-test

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@akosyakov
Copy link
Member

@evidolob trying, could you have a look at #4824?

@akosyakov
Copy link
Member

@evidolob If i set up 30 sec I can reproduce an issue, but the PR does no fix it.

onStart is called after the server is already started

@akosyakov
Copy link
Member

akosyakov commented Apr 8, 2019

@evidolob I think we need a new lifecycle callback for the backend app, something like onWillStart. Can you add?

@evidolob
Copy link
Contributor Author

evidolob commented Apr 8, 2019

@akosyakov Yes, this fix is not resolving the issue, I'm going to close it, and create new one.
I think I will do more async code, so browser request for plugins metadata will check that all plugins are processed or will wait until plugin metadata will be present

@akosyakov
Copy link
Member

@evidolob ok

@evidolob evidolob closed this Apr 8, 2019
@evidolob evidolob deleted the fix-plugin-start branch April 8, 2019 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins don't start the first time
2 participants