-
Notifications
You must be signed in to change notification settings - Fork 52
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
Create devworkspaces using generated DevWorkspace and DevWorkspaceTemplate #429
Conversation
❌ E2E dashboard tests failed ❗ See Details
Test product:
Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe |
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-429 |
[dashboard-ci-test] |
✅ E2E dashboard tests succeed 🎉 See Details
Test product:
Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe |
) as devfileApi.DevWorkspaceTemplate; | ||
|
||
await this.props.createWorkspaceFromPrebuiltResources(devworkspace, devworkspaceTemplate); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this solution, we will be able to create only one workspace from a sample.
But, as a developer, I prefer to have 'a quick start' flow, when I can choose a sample with needed technology, create a new workspace. Then, add a new project inside, push it to upstream without requirement to recreate a new workspace.
Note:
We need to recreate workspace, because with this implementation click on a sample creates a new devworkspace from prebuilt resources without changing its name(adding some generated symbols as it was previosly).
And we can't create two workspaces with different name from the same sample, can't rename existing devworkspace. So, it will require to recreate each workspace wich was based on that sample.
My proposal: improve this implementation and add some generated symbols to devworkspace and devworkspacetemplate names
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this solution, we will be able to create only one workspace from a sample.
I believe this is fine for the first iteration. Basically, if a workspace based on the sample already exists, clicking on the devfile sample again will reopen the existing one. For the time being I would avoid doing any modifications of the DevWorkspace / DevWorkspace template on UD level
packages/dashboard-frontend/src/store/Workspaces/devWorkspaces/index.ts
Outdated
Show resolved
Hide resolved
packages/dashboard-frontend/src/services/workspace-client/devworkspace/devWorkspaceClient.ts
Outdated
Show resolved
Hide resolved
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-429 |
Codecov Report
@@ Coverage Diff @@
## main #429 +/- ##
==========================================
+ Coverage 49.95% 50.59% +0.63%
==========================================
Files 216 214 -2
Lines 7356 7348 -8
Branches 1223 1220 -3
==========================================
+ Hits 3675 3718 +43
+ Misses 3331 3279 -52
- Partials 350 351 +1
Continue to review full report at Codecov.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, olexii4 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-429 |
@akurinnoy: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What does this PR do?
This PR adds the ability to create devworkspaces using pre-generated resources.
When a user clicks on a sample, the dashboard analyzes the sample looking for devWorkspace links. Among those links it takes one for the default editor, adds that as a query parameter to factory link, and runs factory flow. The Factory Loader detects that query param and skips steps for resolving and fetching devfiles and processing devworkspace templates to apply editor-specific stuff. Instead, it fetches pre-generated resources, creates devworkspace template and devworkspace, and starts the devworkspace.
Screencast
Screen.Recording.2021-12-22.at.11.16.49.mov
What issues does this PR fix or reference?
resolves eclipse-che/che#20829
Is it tested? How?
Create a workspace from the Quick Add page.