redhat-developer / vscode-server-connector

📦 VS Code extension to run JBoss EAP servers and Runtimes
Eclipse Public License 2.0
57 stars 26 forks source link

Downloading wildfly 9 fails silently when using java 11 #323

Closed adietish closed 5 years ago

adietish commented 5 years ago

steps:

  1. ASSERT: you need at least rsp-server 0.15.1 (manually build it/download the distribution from https://repository.jboss.org/nexus/service/local/repositories/snapshots/content/org/jboss/tools/rsp/distribution/org.jboss.tools.rsp.distribution/0.15.1-SNAPSHOT/org.jboss.tools.rsp.distribution-0.15.1-20190510.114547-1.zip)
  2. ASSERT: have java 11 as default in your OS, no java configured in (vscode) Settings > Servers View
  3. EXEC: download wildfly 9
  4. EXEC: wait until download finished

Result: No server is created, no error is displayed One can see that the reason for this is the incompatible combination wildfly 9 / Java 11 when manually adding the server. An error pops up informing of this.

Expected result: An error should be displayed that the server cannot be created bcs java 11 is not compatible with java 11

adietish commented 5 years ago

We fail launching servers with incompatible combinations (ex. wildfly 9 + java 11 - see https://github.com/redhat-developer/rsp-server/issues/216#issuecomment-491242212). I thus believe that we should allow people to create those servers. @lstocchi @robstryker @jeffmaury WDYT?

jeffmaury commented 5 years ago

I agree because I don't see how we could prevent it given that the JVM is just an optional property when creating a server

robstryker commented 5 years ago

In the downloading workflow, the server should be created no matter what. Eventually we will need to provide the user a way to customize these details, to set the jvm later, to set specific attributes, etc etc.

adietish commented 5 years ago

@robstryker why should creating a server via downloading it or via one from disk differ?

robstryker commented 5 years ago

When using the download workflow, the user has no ability to override the vm attribute for the created server adapter. With no way to participate in the process, the user might see no other option but to re-download the runtime again after restarting, since they won't know where the RSP downloaded the first copy. If the runtimes are large, this will be extremely annoying. The user may need to wait 5, 10, or 20 minutes to repeat the process.

When a user is using an already local runtime, though, we can simply reject their creation attempt. Then the user can either try again with a hard-coded jvm, or, restart vscode and rsp with a different java and then do the create.

Basically, the presence of a potentially very long running task (the download) makes it unreasonable for us to reject the user after a download.

adietish commented 5 years ago

this wont happen any more given that java version checking was removed in https://github.com/redhat-developer/rsp-server/pull/349

adietish commented 5 years ago

resolving, closing.