Closed mmulholl closed 4 years ago
My windows testing has now hit the same issue.
If you right click on Projects (Local) and select Refresh does the application show up?
Martin says that Refresh does not help in which case it is more likely a PFE problem. Asked Martin for the Eclipse workspace log just to confirm.
In the workspace log it is complaining that it can't find the locOnDisk field in the JSON for a project (org.json.JSONException: JSONObject["locOnDisk"] not found.
). Not sure what would cause this though I did find the following in the PFE logs:
^[[91m[17/10/19 20:42:00 Turbine] [ERROR]^[[39m [File Name: /file-watcher/server/dist/projects/ShellExtensionProject.js | Function Name: ShellExtensionProject.setLanguage | Line Number: 70] Unexpected end of JSON input
According to Toby the locOnDisk field was removed by accident as part of the hybrid work.
not by accident, it was deliberately removed, just tracking the reason down but it has been gone for quite a while
are you using a mismatch of IDE plugin version and codewind version ? In 0.5.0 codewind we have locondisk set as
this.locOnDisk = ${global.codewind.CODEWIND_WORKSPACE}${this.directory}
;
@mmulholl ^ When I do a docker images on the machine you were using it shows latest and 0.3.1 but no 0.5.0.
This would explain why I could not reproduce it on my machine - I was using 0.5.0 Eclipse IDE and 0.5.0 Codewind images.
ok, I don't think this is a stopship then
Please look again, I am using 0.5.0 images, they are tagged "latest". The 0.3.1 images are hangovers form previous testing.
Docker ps:
650efb31e4f9 codewind-pfe-amd64:latest "sh -c ' /file-watch…" 24 hours ago Up 24 hours 127.0.0.1:10000->9090/tcp codewind-pfe 8d223101ff3f codewind-performance-amd64:latest "docker-entrypoint.s…" 24 hours ago Up 24 hours 127.0.0.1:9095->9095/tcp codewind-performance
docker images: 650efb31e4f9 codewind-pfe-amd64:latest "sh -c ' /file-watch…" 24 hours ago Up 24 hours 127.0.0.1:10000->9090/tcp codewind-pfe 8d223101ff3f codewind-performance-amd64:latest "docker-entrypoint.s…" 24 hours ago Up 24 hours 127.0.0.1:9095->9095/tcp codewind-performance
Eclipse info: Codewind tech preview 0.5.0.v201910151926
This in workspace .log: !ENTRY org.eclipse.codewind.core 4 0 2019-10-17 16:42:45.213 !MESSAGE [ERROR CodewindApplicationFactory.createApp:123] Error parsing project json: {"extension":{"path":"/codewind-workspace/.extensions/codewind-appsody-extension","detection":".appsody-config.yaml","templates":null,"name":"appsodyExtension","projectType":"appsodyExtension","description":"Appsody extension for Codewind","version":"0.5.0","config":{"containerAppRoot":"/project/user-app"},"commands":[{"args":["init"],"name":"postProjectValidate","command":"appsody"},{"args":["init","$subtype","none"],"name":"postProjectValidateWithType","command":"appsody"}]},"workspace":"/root/codewind-workspace/","appImageLastBuild":"1571344934000","projectType":"appsodyExtension","detailedBuildStatus":" ","language":"java","ports":{"internalPort":"35729","exposedPort":"33654"},"directory":"SVTAddExistingAppsodySpringDefaultProject1","buildStatus":"success","projectWatchStateId":"2b1a1b34234ca2b2e998ebbcba1e601e","autoBuild":true,"validationResults":[],"host":"192.168.96.8","state":"open","containerId":"7bdd10c8968b7aa2d2d1fe71f587b301cac76cd3ce85136643b23f4d7085b0f7","projectID":"9081df10-f10d-11e9-a8a6-07e30440df11","validationStatus":"success","logs":{"app":{"origin":"workspace","files":["/codewind-workspace/.logs/SVTAddExistingAppsodySpringDefaultProject1-9081df10-f10d-11e9-a8a6-07e30440df11/appsody.log"]},"build":{"origin":"workspace","files":[]}},"codewindVersion":"latest","detailedAppStatus":"Pinging http://192.168.96.8:35729/health and http://192.168.96.8:35729/","appStatus":"stopped","lastbuild":1571344934969,"buildLogPath":"/codewind-workspace/.logs/SVTAddExistingAppsodySpringDefaultProject1-9081df10-f10d-11e9-a8a6-07e30440df11/docker.build.log","loadTestPath":"/codewind-workspace/SVTAddExistingAppsodySpringDefaultProject1/load-test","startMode":"run","name":"SVTAddExistingAppsodySpringDefaultProject1","isHttps":false,"infLockFlag":false,"location":"/codewind-workspace/SVTAddExistingAppsodySpringDefaultProject1","appErrorStatus":"Failed to ping application due to timeout."} !STACK 0 org.json.JSONException: JSONObject["locOnDisk"] not found. at org.json.JSONObject.get(JSONObject.java:515) at org.json.JSONObject.getString(JSONObject.java:686) at org.eclipse.codewind.core.internal.CodewindApplicationFactory.createApp(CodewindApplicationFactory.java:116) at org.eclipse.codewind.core.internal.CodewindApplicationFactory.getAppsFromProjectsJson(CodewindApplicationFactory.java:64) at org.eclipse.codewind.core.internal.connection.CodewindConnection.refreshApps(CodewindConnection.java:279) at org.eclipse.codewind.core.internal.connection.CodewindSocket.onProjectCreation(CodewindSocket.java:279) at org.eclipse.codewind.core.internal.connection.CodewindSocket.access$900(CodewindSocket.java:46) at org.eclipse.codewind.core.internal.connection.CodewindSocket$10.call(CodewindSocket.java:138) at io.socket.emitter.Emitter.emit(Emitter.java:117)
You should be able to tell from the line numbers in the stack which version is running.
also if I right click on "Projects (Local)" one of the options is "Manage Template Sources..." which I am pretty sure was not available on 0.3.1.
Here is another stack from the log (i think the line number for the NewCodewindProjectWizard proves it is not 0.3.1 that is running. :
org.json.JSONException: JSONObject["locOnDisk"] not found. at org.json.JSONObject.get(JSONObject.java:515) at org.json.JSONObject.getString(JSONObject.java:686) at org.eclipse.codewind.core.internal.CodewindApplicationFactory.createApp(CodewindApplicationFactory.java:116) at org.eclipse.codewind.core.internal.CodewindApplicationFactory.getAppsFromProjectsJson(CodewindApplicationFactory.java:64) at org.eclipse.codewind.core.internal.connection.CodewindConnection.refreshApps(CodewindConnection.java:279) at org.eclipse.codewind.ui.internal.wizards.NewCodewindProjectWizard$1.run(NewCodewindProjectWizard.java:129) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I can see that master branch of pfe has a change thats leaked through from the hybrid changes that will cause this problem. I've put a PR up to fix in master. However, this code is ok in the 0.5.0 branch of pfe so need to make sure the 0.5.0 eclipse plugin is pulling the 0.5.0 pfe
By default, the 0.5.0 version of the plugins requires docker images tagged '0.5.0'. I'd like to understand why the docker images in question are tagged 'latest'?
I can confirm that the 0.5.0 eclipse plugin does pull the 0.5.0 docker images:
% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
af88d56a6efe cw-liberty1-e83380a0-ea0b-11e9-a033-718682727367 "/home/default/artif…" 22 seconds ago Up 20 seconds 127.0.0.1:32773->7777/tcp, 0.0.0.0:32782->9080/tcp, 0.0.0.0:32781->9443/tcp cw-liberty1-e83380a0-ea0b-11e9-a033-718682727367
565e4b6238f6 cw-node1-a0286640-e303-11e9-910b-91f3c38b5f18 "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:32780->3000/tcp, 127.0.0.1:32772->9229/tcp cw-node1-a0286640-e303-11e9-910b-91f3c38b5f18
b507d7443d61 cw-gogo-970958d0-e303-11e9-910b-91f3c38b5f18 "/app/main" 3 minutes ago Up 3 minutes 0.0.0.0:32779->8000/tcp cw-gogo-970958d0-e303-11e9-910b-91f3c38b5f18
04f5a392981e cw-python1-a3bb4670-e302-11e9-910b-91f3c38b5f18 "python app.py" 4 minutes ago Up 4 minutes 0.0.0.0:32778->5000/tcp cw-python1-a3bb4670-e302-11e9-910b-91f3c38b5f18
aff527659001 codewind-pfe-amd64:0.5.0 "sh -c ' /file-watch…" 5 minutes ago Up 5 minutes 127.0.0.1:10000->9090/tcp codewind-pfe
6d357ca909b2 codewind-performance-amd64:0.5.0 "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 127.0.0.1:9095->9095/tcp codewind-performance
% docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
cw-liberty1-e83380a0-ea0b-11e9-a033-718682727367 latest cb87b374b772 2 minutes ago 901MB
cw-node1-a0286640-e303-11e9-910b-91f3c38b5f18 latest c1de4810364b 3 minutes ago 1.02GB
liberty-app-cache latest 515375cde979 4 minutes ago 873MB
spring-app-cache latest 011ac48a3ac4 4 minutes ago 414MB
cw-gogo-970958d0-e303-11e9-910b-91f3c38b5f18 latest a91d26798799 5 minutes ago 810MB
cw-python1-a3bb4670-e302-11e9-910b-91f3c38b5f18 latest 31722bb13efd 6 minutes ago 113MB
python 3.7-alpine 399ca5fe696b 2 days ago 102MB
ibmjava 8-sfj 6847e43e401d 2 days ago 167MB
eclipse/codewind-initialize-amd64 0.5.0 db7a5e29c893 2 days ago 210MB
codewind-initialize-amd64 0.5.0 db7a5e29c893 2 days ago 210MB
eclipse/codewind-performance-amd64 0.5.0 f66bf4e1870c 2 days ago 86.3MB
codewind-performance-amd64 0.5.0 f66bf4e1870c 2 days ago 86.3MB
codewind-pfe-amd64 0.5.0 642f8476edd3 2 days ago 709MB
eclipse/codewind-pfe-amd64 0.5.0 642f8476edd3 2 days ago 709MB
golang latest dc7582e06f8e 3 days ago 803MB
node 8-stretch 52a261fa5e4b 3 days ago 895MB
ibmcom/codewind-java-project-cache latest 30c11c49e29d 7 weeks ago 231MB
websphere-liberty 19.0.0.3-webProfile7 c6892fcebf3c 2 months ago 460MB
The only way the eclipse plugins will install and use images tagged latest
is if one of the environment variables CW_TAG
or INSTALL_VERSION
is set to latest
. If that's the case, then we have the 0.5.0 eclipse plugin running against docker images from the master branch, and this is not a valid test scenario for 0.5.0
Codewind version: Codewind tech preview 0.5.0.v201910151926 OS: Linux
Che version: IDE extension version: IDE version: Eclipse IDE for Eclipse Committers Version: 2019-06 (4.12.0) Kubernetes cluster:
Description: After working for a while suddenly when I create a project it does not appear in the list of projects in codewind. The project is created in the workspace. At the time of creation there are no other project in codewind.
First stated during automated testing but is now reproducible manually.
Steps to reproduce:
Workaround: