[jbosstools-issues] [JBoss JIRA] (JBIDE-24447) Look for minishift configuration in MINISHIFT_HOME

Rob Stryker (JIRA) issues at jboss.org
Mon Aug 7 20:07:00 EDT 2017


    [ https://issues.jboss.org/browse/JBIDE-24447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445365#comment-13445365 ] 

Rob Stryker commented on JBIDE-24447:
-------------------------------------

> What is important here is the thing that it is my old CDK 2.x folder with cdk.zip file unzipped and other stuff like vagrant box file, etc... (ls -all gives me no 'cdk' file that would contains runtime detection information which would clarify why it is was detected).

CDK 2 is automatically detected by checking the running eclipse's configuration location and going to the relative path Platform.getOS().equals(Platform.OS_MACOSX) ? "../../../" : "") + "../../../cdk/";   This is typically where the installer would install the older runtimes.   It then scans that folder for stuff. 

This sounds like it's working as expected?

> But, If I delete that adapter that was magically added via Runtime Detection on fresh start and restart the IDE, I got: 

In the first start, we attempt to create runtimes directly, oftentimes using data from the installer. We try our best to do this to the best of our ability without involving user input on their first start. It's assumed that the installer will set variables or points in data files we check. However, after the first start is over, runtime detection will still try to 'detect' runtimes in the various "runtime path" locations, but won't assume nearly as much. They'll no longer check some of the installer configuration files, and will do a pure detection based only on the folder for the runtime path. 

This also sounds like it is working as expected?

> The Adapter is called "Container Development Environment 3", which does not happen when you create server adapter manually via New Server. It should be called the same, right?

This sounds like a legitimate bug. 

> I found out that in cdk server adapter's launch configuration, under environment tab, there is defined MINISHIFT_HOME env. var. It points to ~/Programs/cdk. But, devstudio is run from shell where MINISHIFT_HOME is set to ~/minishift_home. Very strange. 

Once a server adapter is created, we *will not* go modifying it based on whatever shell the user is launching it from. The user may have made several custom changes to it already, and we won't go putting our finger in the stuff they already set, or that we set to defaults. This would lead to inconsistant behavior based on where the user launches his workspace from. So once the server is created, THOSE are the values, and they won't be changed unless the user changes them. 

This sounds like when it was launched via the installer, the MINISHIFT_HOME environment variable was set when launching eclipse. Subsequent reloads of the devenv are being run from a shell directly? 

This, again, sounds like it's behaving as expected. The installer sets an environment variable (minishift_home) when launching, OR sets a property in some of the files that we asked installer to set for us. We create a server using those values, and we don't change it later if a user decides to relaunch from a different shell, or, if the shell they're launching from (on first start) has a different minishift_home than the installer files we check. 

> Look for minishift configuration in MINISHIFT_HOME
> --------------------------------------------------
>
>                 Key: JBIDE-24447
>                 URL: https://issues.jboss.org/browse/JBIDE-24447
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: runtime-detection
>    Affects Versions: 4.4.4.Final
>            Reporter: Jan Richter
>            Assignee: Rob Stryker
>             Fix For: 4.5.0.Final
>
>         Attachments: cdk2_x_RD.png, cdk3_minishift_home.png
>
>
> One can use the MINISHIFT_HOME variable to save minishift configuration somewhere else than in ~/.minishift
> It would be nice if runtime detection looked there if the variable is configured.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list