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

Improve the way of storage runtime info for Che tasks #13722

Closed
RomanNikitenko opened this issue Feb 21, 2019 · 12 comments
Closed

Improve the way of storage runtime info for Che tasks #13722

RomanNikitenko opened this issue Feb 21, 2019 · 12 comments
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Milestone

Comments

@RomanNikitenko
Copy link
Member

Currently runtime info for Che tasks is available till we refreshing the page.
I guess the problem is related to how we store runtime info.
CheTaskImpl is created every time the page is reloaded, so task map is empty for this case and lose runtime info for Che tasks.
So we should consider another way of storage.

@benoitf benoitf transferred this issue from eclipse-che/che-theia Jul 5, 2019
@benoitf benoitf added area/editor/theia Issues related to the che-theia IDE of Che kind/enhancement A feature request - must adhere to the feature request template. labels Jul 5, 2019
@vparfonov vparfonov added this to the 7.1.0 milestone Jul 26, 2019
@slemeur slemeur modified the milestones: 7.1.0, 7.x Aug 2, 2019
@l0rd
Copy link
Contributor

l0rd commented Aug 2, 2019

@RomanNikitenko @vparfonov this is an issue created 6 months ago. Is it still relevant? Is it related to stable Che-Theia (branch 7.0.0) or to upstream Theia (master branch)? Is it related to #14098?

@vparfonov
Copy link
Contributor

@RomanNikitenko @vparfonov this is an issue created 6 months ago. Is it still relevant? Is it related to stable Che-Theia (branch 7.0.0) or to upstream Theia (master branch)? Is it related to #14098?

Yes, it sill actual, but we can't fix it for 7.0.0 so we will focused on master branch

@vinokurig vinokurig self-assigned this Aug 5, 2019
@sunix
Copy link
Contributor

sunix commented Aug 6, 2019

Reading at the description

so task map is empty for this case and lose runtime info for Che tasks.

it sounds like a bug. But I don't think i have faced that one so far. What is the impact for the user ?

@vinokurig
Copy link
Contributor

vinokurig commented Aug 12, 2019

taskMap is a map with Task objects. Task contains handlers:

export interface Task {
        /** Terminates the task. */
        kill(): Promise<void>;
        /** Returns runtime information about task. */
        getRuntimeInfo(): TaskInfo;
    }

that are implemented in the plugin side by registering a runner with task implementation:
async registerTaskRunner(type: string, runner: TaskRunner): Promise<Disposable> { :
https://github.com/eclipse/che-theia/blob/b94aadc789b15bef3d85ea9dd1fb3d154ff28cd3/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-task-impl.ts#L23.

We store Task implementation in the plugin side because we cannot transfer handlers to the theia side. We transfer only the handler ids but the implementation is set to taskMap in the plugin side.
The problem is that the plugin side (CheTaskImp) is reloaded each time the browser refreshes and the map is cleaned. According to the current Plugin-Api model it is impossible to save functions after closing the plugin in the plugin side, but the handler ids are registered in the theia's backend, so when the page is refreshed taskMap in the CheTaskImp is cleaned but it can receive requests https://github.com/eclipse/che-theia/blob/b94aadc789b15bef3d85ea9dd1fb3d154ff28cd3/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-task-impl.ts#L41-L54 from theia's backend.
@benoitf @evidolob WDYT?

@sunix
Copy link
Contributor

sunix commented Aug 12, 2019

What is the impact for the user ?
or is it just refactoring ?

@vinokurig
Copy link
Contributor

When we run a long task that is implemented in the plugin, we cannot get it's run-time info or stop it after page refresh

@vparfonov
Copy link
Contributor

@sunix Impact fro user described in initial comment for issue:
User will lost context for running task if refresh the page

@sunix
Copy link
Contributor

sunix commented Aug 12, 2019

OK @vparfonov i am a user, I run the task and I have refreshed the page and "lost context". What does it mean ?
Does it mean that I won't see the previously run tasks terminals, or content ? or what ?

what is the run-time info, how user get it ?

@vinokurig
Copy link
Contributor

@sunix user will not be able to stop the task

@vparfonov
Copy link
Contributor

@benoitf @evidolob Any ideas, looks like we need your help

@vparfonov vparfonov added severity/P1 Has a major impact to usage or development of the system. team/ide status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach labels Aug 15, 2019
@sunix
Copy link
Contributor

sunix commented Aug 15, 2019

Ctrl-c ?

@RomanNikitenko
Copy link
Member Author

RomanNikitenko commented Aug 16, 2019

@sunix
The comment describes the cause of the issue:

According to the current Plugin-Api model it is impossible to save functions after closing the plugin in the plugin side

So, this is not question of way how we are going to stop a task, this is question of the architecture.

@benoitf benoitf modified the milestones: 7.x, Backlog - IDE 1 Sep 25, 2019
@vparfonov vparfonov modified the milestones: Backlog - IDE 1, 7.3.0 Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Projects
None yet
Development

No branches or pull requests

7 participants