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

Factory policies.create=peruser #14355

Closed
skabashnyuk opened this issue Aug 29, 2019 · 11 comments
Closed

Factory policies.create=peruser #14355

skabashnyuk opened this issue Aug 29, 2019 · 11 comments
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Aug 29, 2019

Is your task related to a problem? Please describe.

Provide an ability to create workspaces from factories per user.

Describe the solution you'd like

The idea is to have a query parameter policies.create=peruser like http://host/f?url=blah&policies.create=peruser that will cause only one workspace to be generated for each unique user that clicks on the factory URL. If the workspace has previously been generated, the existing workspace is reopened.

Describe alternatives you've considered

none

Additional context

Che6 persisted factory feature https://www.eclipse.org/che/docs/che-6/factories_json_reference.html#policies

@skabashnyuk skabashnyuk added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Aug 29, 2019
@skabashnyuk skabashnyuk added this to the 7.2.0 milestone Aug 29, 2019
@skabashnyuk skabashnyuk added the severity/P1 Has a major impact to usage or development of the system. label Aug 29, 2019
@tolusha
Copy link
Contributor

tolusha commented Aug 29, 2019

may be create?

@sunix
Copy link
Contributor

sunix commented Sep 4, 2019

Has that issue been 'triaged' ?

@sunix
Copy link
Contributor

sunix commented Sep 4, 2019

@skabashnyuk Is it a issue for platform team ? or do we have anything to do in the Dashboard or che-theia side

@skabashnyuk
Copy link
Contributor Author

@sunix this task is for the team who has more expertise in the dashboard. I think it is ide2.

@skabashnyuk
Copy link
Contributor Author

As I remember I've discussed this task with @evidolob, I thought he wants to delegate it to @olexii4
Basic idea is to handle this logic on the Dashboard side.

  • Check if policies.create=peruser set
  • if yes -> iterate over all workspaces searching for attribute "factoryurl" = to current query URL
    • if found redirect to that workspace
    • if not create a new workspace and set "factoryurl" attribute.

@sunix
Copy link
Contributor

sunix commented Sep 4, 2019

I thought factory service wasn't aware of the dashboard ? @olexii4 ?

@vitaliy-guliy
Copy link
Contributor

@skabashnyuk and me have a discussion about workspace creation flow using a factory.

http://host/f?url=blah&policies.create=peruser just redirects on http://host//dashboard/#/load-factory/?url=blah&policies.create=peruser and then dashboard creates a workspace using factory and workspace services.

@sunix yes, it looks IDE2 team is responsible for this issue

To have the issue done we need

  • ensure that query parameter policies.create=peruser is passed to the dashboard
  • add a property to the workspace settings/attributes that indicates from which URI this workspace has been created
  • while handling a factory in dashboard, find for already existing workspace if query parameter policies.create=peruser is set

@sunix
Copy link
Contributor

sunix commented Sep 4, 2019

ok, thanks @vitaliy-guliy and @skabashnyuk for the details

@olexii4
Copy link
Contributor

olexii4 commented Sep 6, 2019

@skabashnyuk We can create a new workspace with URL http://host/f?url=location.
that will create a new workspace with attributes.factoryId = 'undefined' because any factories are not supported at all.
If I am not mistaken, nowadays we cannot create a new factory based on a devfile.
Could we use attributes.stackName=locationl instead?

@skabashnyuk
Copy link
Contributor Author

@olexii4 I'm not sure I understand your question. Can you rephrase?
My proposal was #14355 (comment).
attributes.factoryId this is for old Che6 persisted factories. It's not our case.

@olexii4 olexii4 self-assigned this Sep 6, 2019
@olexii4
Copy link
Contributor

olexii4 commented Sep 6, 2019

@skabashnyuk I just confused with the word 'factory'. I thought about CHE factories.
All are clear now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants