Rh-che: Make all factories from eclipse.org website (Che 6) ephemerals

Created on 6 Feb 2019  路  41Comments  路  Source: redhat-developer/rh-che

Most helpful comment

Sum up of current state of debug test so you can follow it.

| factory | status | comment |
|---------- | -------- | ------------ |
| PHP | OK | |
| Java + Maven | OK | |
| Spring Boot | OK | |
| Spring Rest Guide | OK | |
| Spring | OK | |
| Vert.x verticle | OK | |
| Angular 2 | not tested | Testing angular debug is not trivial. Skipping. |
| C++ | OK | |
| Java + Gradle | not working | Breakpoint is not hit. Separate issue https://github.com/redhat-developer/rh-che/issues/1344|
| Node.js | not working | Can not debug, see description below. |
| Vaadin | OK | |
| Wildfly | not tested | Build of project fails. Separate issue #1342|

Steps for reproduction Node.js
I followed steps here: https://codenvy.com/docs/user-guide/debug/index.html#nodejs. When running debug command I can see that the command is wrong. It is ${current.project.path}/app.js but should be ${current.project.path}/app/app.js. But even when fixing it I was not able to run the debug here.

Steps for reproduction Java + Gradle
Open factory that will create a workspace https://che.openshift.io/f?id=factorydxms3luqlij4g39w. Open run command and edit line to this:

cd ${current.project.path} && gradle build && java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9099 -jar build/libs/*.jar

Run the command. You can see Listening for transport dt_socket at address: 9099 in terminal window. Set your breakpoint to line 5 in file HelloWorld.java. Go to Run -> Edit debug configurations... , create new Java, set port to 9099, click Save and Debug. The run completed but breakpoint was not hit.

All 41 comments

ephemeral switch should be only once the following features would be released and available on prod:

@ibuziuk Is there a way to split this task so that I can verify some of the stacks?

@amisevsk we could probably turn this to epic and add every single factory verification as a sub-task

@amisevsk another option is spit it into changes required for stacks and factories

I created an issue to add to the warnings for ephemeral workspaces: https://github.com/eclipse/che/issues/12960

We also need to think thought the impact on workspaces and factories. My opinion:

Default for workspaces: ephemeral
Default for factories: PVC-based
Default for all Che getting started factories: ephemeral

@slemeur @l0rd - any concerns with that?

I'm not sure to understand the logic behind "default for factories", if we go with ephemoral when users are creating workspaces.

IMO, in term of experience, it would be more comprehensive if we make everything ephemoral by default - but we make it easy to turn on the persistent storage on any workspaces.
But I'm not sure what the experience look like when you are moving from ephemoral to persistent. cc @ibuziuk

But I'm not sure what the experience look like when you are moving from ephemoral to persistent

No UX differences for switching between emptyDir / PVC volume for the storage:

  1. PVC

image

  1. emptyDir

image

If I have a running workspace and I turn on persistent storage, how is this handled?

next time when you start the workspace PVC would be used

so if I had changes, they are lost. correct?
That is a warning that must be given to the end-user.

In the real world 95% of developer use cases will involve an expectation that information is persisted between workspace runs. Defaulting to ephemeral is dangerous because it means that 95% of the time a user will need to make a conscious choice to add PVC.

If you want to align the two then I'd argue we should have both newly created workspaces and factories default to PVC. We can use ephemeral for all our samples and examples though.

so if I had changes, they are lost. correct?

correct.

That is a warning that must be given to the end-user.

@ashumilova could you please comment on that and summarize what warnings are already in place and what is missing from your perspective

If you want to align the two then I'd argue we should have both newly created workspaces and factories default to PVC. We can use ephemeral for all our samples and examples though.

ok, so let's try to choose one option:

A. only factories from https://www.eclipse.org/che/getting-started/cloud/ are ephemeral
B. factories from https://www.eclipse.org/che/getting-started/cloud/ are ephemeral + by default workspases are ephemeral (ephemeral toggle is enabled)

image

C. by default everything is non-ephemeral

To add, the reason we were aiming for ephemeral workspaces in the past is because of Gluster's slowness. Trying to use a Gluster-backed PVC means that git checking out most projects of reasonable size can take minutes.

@ashumilova could you please comment on that and summarize what warnings are already in place and what is missing from your perspective

we have this message on workspace start
image

we have this message in status bar in IDE:
image

what is left this enhancement I think:
https://github.com/eclipse/che/issues/12960

we have this message in status bar in IDE:

@ashumilova is there anything similar for GWT based IDE? The scope of this issue is mainly Che 6 / GWT IDE based

ah, no-no-no - nothing in GWT one. Should be separate issue for IDE1.

@ashumilova thanks for clarifications - smth. to discuss during SoS. At the moment the expectations from che.openshift.io are not really clear for short / mid-term cc: @l0rd @slemeur

@Katka92 @ScrewTSW all 12 factories have been updated to be ephemeral - https://www.eclipse.org/che/getting-started/cloud/
Now we do need some help from QA to verify that each of it works correctly and reliably (For the next sprint we might consider adding e2e tests for pre-difined factories). In the current sprint we need to verify the following:

  • workspace from each factory is created and started without failures in less than 2 minutes
  • for each factory ephemeral workspace emptyDir volume (NOT pvc) is used:

image

  • Che features e.g. content assist / text colouring etc work fine in the newly created workspaces from those 12 factories

  • If smth is not working - an issue with details should be reported and added to this issue description as sub-tasks (KNOWN ISSUES section)

@ibuziuk Questions regarding to testing:
1) For some project, commands for run or build are placed to COMMON so they are not seen in quick select [1]. Others have the commands places correctly [2]. Is that intended?

2) When starting ephemeral workspace from dashboard by clicking the play icon, the pop-up is shown informing about starting ephemeral workspace. This pop-up is not shown when starting workspace by clicking in left menu neither by starting via URL https://www.eclipse.org/che/getting-started/cloud/. Is that intended?

3) Should we tests the behaviour of re-opening that workspace? If so, should you specify the behaviour please (if run command should be executed too or not)?

[1] Screenshot from 2019-03-29 08-24-34

[2]Screenshot from 2019-03-29 08-30-52

For some project, commands for run or build are placed to COMMON so they are not seen in quick select [1]. Others have the commands places correctly [2]. Is that intended?

yes, I believe this might be expected since command are put into the section based on the "type" attribute e.g.:

        "commandLine": "cd ${current.project.path} && node .",
        "name": "run",
        "type": "custom",
        "attributes": {
          "goal": "Run",
          "previewUrl": "${server.8080/tcp}"
        }

In any case, this is fairly minor thingy - the most important features are content assist, syntax colouring, navigation, which need to be tested meticulously.

When starting ephemeral workspace from dashboard by clicking the play icon, the pop-up is shown informing about starting ephemeral workspace. This pop-up is not shown when starting workspace by clicking in left menu neither by starting via URL https://www.eclipse.org/che/getting-started/cloud/. Is that intended?

cc: @ashumilova @bmicklea @slemeur^

Should we tests the behaviour of re-opening that workspace? If so, should you specify the behaviour please (if run command should be executed too or not)?

yes, could you provide info what currently happens when the ephemeral workspace is reopened? I suppose all changes should be vanished and it should look like just like you opoened it for the first time

Thank you for your answer, I'll continue with testing and provide sum up after that.

yes, I believe this might be expected since command are put into the section based on the "type" attribute

I was wondering why "run" command does not have "run" type, but I agree this is minor issue. Thanks for explanation.

Anytime you start an ephemeral workspace you should see the warning. Good
catch on the workspace quick starter on the left navigation and the URL.
Those should show the warning too.

You should also see the warning again when restarting the workspace.

Brad Micklea // Group Lead, Developer Tools & Program // 416.707.0792

This pop-up is not shown when starting workspace by clicking in left menu neither by starting via URL https://www.eclipse.org/che/getting-started/cloud/. Is that intended?

@Katka92, I have checked and in the left menu it works only by using "Run" button, you are right - when using direct workspace link or factory - no message is shown, we need to fix that, but perhaps it will be not a dashboard popup, but a message in workspace loader or on factory loading page

@ibuziuk When I click the link to create factory, it opens new window and when IDE is loaded, it opens some file and run the code. Is there some logic in opening that file? Like once it is a class, but e.g. for vaadin it is a README file. Just wondering if we should verify something here too.

That behavior is defined in the factory that gets run. You can find more

info on factory post-load options in the Che docs.

Brad Micklea // Group Lead, Developer Tools & Program // 416.707.0792

@bmicklea Thank you for your answer. My question was more about like if that setting is ok. I would expect this behaviour united - like it always opens README or it always opens code. But it is more like detail.

@ashumilova Just an idea - what about having a line saying something like You are using ephemeral workspace directly in IDE, so that it will be seen all the time and you don't have to deal with different types of start up of the workspace.

@Katka92 we have small one in status bar, but you mean something like warning bar at the top, right?

@ashumilova I see, there is a small misunderstanding. These factories from page https://www.eclipse.org/che/getting-started/cloud/ creates Che 6 workspaces. And there is no info about ephemeral state. I like the notice in status bar as it is in Che 7.

it was introduced recently in GWT IDE as well - https://github.com/eclipse/che/pull/12975
but i like the idea of having some warning with more attention.

Ah, nice, I didn't know, thank you for pointing me there. I think this is good step. But yeah I agree that it can be overlooked.

@ibuziuk Sum up from QA testing:
All workspaces were started as ephemeral, all projects were imported, one file of the project was opened (it was code or README file) and run command was executed. Text coloring seems fine for all files. There were some major bugs found. Issues are created and added to KNOW ISSUES section in this issue description.

Creating workspace via link
There are some minor issues I've found:

1) Adding << in C++ file automatically adds >>. That means, if you write std::cout << you got std::cout <<>>. I assume this is not a bug but it is really annoying.

2) Running command manually in some type of factories does not open terminal immediately so it seems that nothing is happening after clicking RUN. The terminal opens after ~20 seconds and executes the commands. If you click RUN more times in a row (e.g. you think that nothing is happening so you try it again) it will execute command more times after that ~20 seconds, which spawns more terminal windows and can cause some of them fail.

3) RUN and BUILD commands are not shown in quick select menu in the top bar [1] for some factories. These commands are found in COMMON section [2].

4) Java + Gradle When running RUN or BUILD command first time, there are warnings in the code [3]. Re-running code without doing any change passes without warnings. When change is made, the warning is present again.

If you consider one of these as a relevant thing to fix, please let me know, I'll create an issue with detailed info.

Re-running workspace
When stopping and running workspace again, changes are not preserved, one file is opened and run command is executed.

[1]
Screenshot from 2019-04-02 10-34-40

[2]
Screenshot from 2019-04-02 10-36-26

[3]
Screenshot from 2019-04-02 10-52-36

@Katka92 could you please test if debugging facilities are working as expected?

@ibuziuk I'll take a look tomorrow or on Friday.

Sum up of current state of debug test so you can follow it.

| factory | status | comment |
|---------- | -------- | ------------ |
| PHP | OK | |
| Java + Maven | OK | |
| Spring Boot | OK | |
| Spring Rest Guide | OK | |
| Spring | OK | |
| Vert.x verticle | OK | |
| Angular 2 | not tested | Testing angular debug is not trivial. Skipping. |
| C++ | OK | |
| Java + Gradle | not working | Breakpoint is not hit. Separate issue https://github.com/redhat-developer/rh-che/issues/1344|
| Node.js | not working | Can not debug, see description below. |
| Vaadin | OK | |
| Wildfly | not tested | Build of project fails. Separate issue #1342|

Steps for reproduction Node.js
I followed steps here: https://codenvy.com/docs/user-guide/debug/index.html#nodejs. When running debug command I can see that the command is wrong. It is ${current.project.path}/app.js but should be ${current.project.path}/app/app.js. But even when fixing it I was not able to run the debug here.

Steps for reproduction Java + Gradle
Open factory that will create a workspace https://che.openshift.io/f?id=factorydxms3luqlij4g39w. Open run command and edit line to this:

cd ${current.project.path} && gradle build && java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9099 -jar build/libs/*.jar

Run the command. You can see Listening for transport dt_socket at address: 9099 in terminal window. Set your breakpoint to line 5 in file HelloWorld.java. Go to Run -> Edit debug configurations... , create new Java, set port to 9099, click Save and Debug. The run completed but breakpoint was not hit.

While testing Java + Gradle, the project is set to blank so the package in project view is showed as directories.
Screenshot from 2019-04-10 12-26-46

@Katka92 there is a separate issue for Java + Gradle - https://github.com/redhat-developer/rh-che/issues/1344
We are planning to change Java + Gradle factory to Che 7 in the next sprint, since in GWT it is barely usable

Closing since all factories on https://www.eclipse.org/che/getting-started/cloud/ are ephemeral. Separate issues related to those factories have been reported and added to the Known Issue section in the description

@ibuziuk Debug is not working on Node.js factory, issue is here https://github.com/eclipse/che/issues/13130

Was this page helpful?
0 / 5 - 0 ratings