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

Make devfile feature to be overridden #14117

Closed
svkr2k opened this issue Aug 5, 2019 · 10 comments
Closed

Make devfile feature to be overridden #14117

svkr2k opened this issue Aug 5, 2019 · 10 comments
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering.

Comments

@svkr2k
Copy link

svkr2k commented Aug 5, 2019

Usage Scenario

Please consider the following usage scenario for eclipse/che:
1.Every user will need one workspace - it would be created when the user logs in and gets destroyed when the user logs-out/inactive.
2.If there are 50 users logged in, there would be 50 workspaces (one per user). All these workspaces shall be created using the same devfile (i.e., editor/tools are same)
3.but projects that the individual users see would be different - the projects shall come from database based on user login.
4.Guest users can also open the ide without logging in (and login later after opening the ide)

The solution I'd like

I shall set CHE_LIMITS_USER_WORKSPACES_RUN_COUNT to '1' and this would allow having only one running workspace per user => This, I believe, would result in an error (saying that only one workspace can be opened per user).

In order to achieve the above behavior, the https://github.com/eclipse/che/tree/master/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile needs to be modified. But, I believe that the above devfile feature is not meant to be overridden.

Alternatives

None. I would prefer it to be overridden instead of forking the entire codebase and modify the behavior.

Additional context

Thank you, @ibuziuk for advise.

@svkr2k svkr2k added the kind/enhancement A feature request - must adhere to the feature request template. label Aug 5, 2019
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Aug 5, 2019
@benoitf benoitf added this to the 7.2.0 milestone Aug 5, 2019
@benoitf
Copy link
Contributor

benoitf commented Aug 5, 2019

@skabashnyuk @ibuziuk are you missing some details on this issue ?

@benoitf benoitf added area/devfile and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Aug 5, 2019
@ibuziuk
Copy link
Member

ibuziuk commented Aug 5, 2019

  1. but projects that the individual users see would be different - the projects shall come from database based on user login.

I personally do not understand the last part of the flow:

  • if devfiles are the same why the projects need to be different?
  • why it is required to store projects in db instead of cvs?
  • how "projects that the individual users see would be different" is planned to be achieved? is there some mapping between user and project ?

In general, the use-case is really specific and I personally do not see it as part of the upstream.

Every user will need one workspace - it would be created when the user logs in and gets destroyed when the user logs-out/inactive.
If there are 50 users logged in, there would be 50 workspaces (one per user). All these workspaces shall be created using the same devfile (i.e., editor/tools are same)

Similar functionality can be achieved by using the combination of:

  • CHE_LIMITS_USER_WORKSPACES_RUN_COUNT - 1 running workspace per user
  • CHE_WORKSPACE_AGENT_DEV_INACTIVE__STOP__TIMEOUT__MS - workspace will be shutdown after some inactivity period

@skabashnyuk skabashnyuk added the status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. label Aug 5, 2019
@skabashnyuk
Copy link
Contributor

@svkr2k can you take a look #13617 it will allow to override project location. Will it work for you?

@svkr2k
Copy link
Author

svkr2k commented Aug 5, 2019

@ibuziuk , @skabashnyuk . Thank you for suggestions. I shall try my best to clarify :-)

if devfiles are the same why the projects need to be different?

i'm thinking of a system, using which, several users can:

Login->Create or Work on created projects (using custom editor & toolset)->Save their projects->Logout->Come back later and ... (cycle repeats)

None of the users share the projects projects that they had created and they all develop independently. So, each user would have a set of projects that he/she created (needs mapping between user and projects he/she created).
When an user logs in, the user can open & work on one of the projects that he/she created during previous login.

I'm open to suggestions on where/how the user project(s) can be stored...

Also, unlike che dashboard that supports multiple devfiles, the system that i'm thinking of would support only one devfile (with editor & tools fixed) and a workspace would be created using this devfile automatically when user logs in. (so, the user would not see any devfile being involved).

@skabashnyuk skabashnyuk removed this from the 7.2.0 milestone Aug 5, 2019
@skabashnyuk
Copy link
Contributor

@svkr2k did you tried to play with CHE_LIMITS_USER_WORKSPACES_RUN_COUNT variable?

@svkr2k
Copy link
Author

svkr2k commented Aug 5, 2019

@svkr2k did you tried to play with CHE_LIMITS_USER_WORKSPACES_RUN_COUNT variable?

@skabashnyuk, I havent tried this yet. i shall try this soon.

@benoitf benoitf added this to the 7.2.0 milestone Aug 5, 2019
@svkr2k
Copy link
Author

svkr2k commented Aug 6, 2019

Updated usage scenario (added no.4) to the original comment.

@skabashnyuk skabashnyuk removed this from the 7.2.0 milestone Aug 6, 2019
@skabashnyuk
Copy link
Contributor

@svkr2k
Usecase 1-3 should be possible to do at this moment.
4. unlikely would happen

@svkr2k
Copy link
Author

svkr2k commented Nov 14, 2019

Usecase 1-3 should be possible to do at this moment.

Thank you @skabashnyuk, Are usecases 1-3 already supported in 7.4.0 ?

@skabashnyuk
Copy link
Contributor

  1. It can be stopped by timeout not deleted by logout.
  2. Default configuration option 1 workspace per user.
  3. Projects will come from the git server. Github for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering.
Projects
None yet
Development

No branches or pull requests

5 participants