Closed johnmcollier closed 5 years ago
The cause of this problem is due to createProject has never been called by portal to turbine on the project if autobuild has been turned off. When autobuild is being turned on again after Codwind restart, portal just call build instead of createProject on the first time build. Based on the last design discussion with @tobespc, the conclusion is to handle it on the portal side to make sure the first time build (e.g. via manual build or switching autobuild from disable to enable), portal will call createProject on the first time build instead of just calling build if portal has never call createProject on turbine to register the project before. Therefore, I am removing the iterative-dev area label since this will be handled by portal component.
It doesn't even look like the user can reasonably recover from this; I tried Disable/Enable but it still got stuck Unknown, so you have to remove and then re-bind the project.
I am working on a fix for this which is 90% of the way there but still has a few issues. The logs/capabilities/build action apis are all working with projects that have autoBuild = false.
PR is ready for review https://github.com/eclipse/codewind/pull/330
Discussed this today with Elson, Toby and Julie. We came to the consensus that autoBuild=false
does not necessarily mean the project should not be built on creation or a restart. Codewind is primarily useful as a development tool if the project is built and running.
It makes sense for create project to be called on Turbine for all enabled projects which will trigger the project to be built once irrespective of whether auto build is on/off. The auto build setting only applies after the project has been initialized (ie. Turbine's createProject is called). Users still have the option of disabling a project if they do not want it to be built and started.
What this translates to in the code is Portal will always call Turbine's createProject as an initialize step before any other APIs are used. This would mean that Turbine will set up the project's build and attempt to run the project and the logs and other APIs will work as expected from there onwards. That should address this issue.
this is now delivered
@jagraj can you verify this in codewind master, when you have a chance
Codewind Version: Latest Development Version Eclipse Version: Eclipse IDE for Enterprise Java Developers 4.11.0 VS Code Version: Code 1.35.1
Operating Systems:
In VS Code, if you click on "AutoBuild", stop Codewind and start Codewind again, you will receive some error messages indicating that no logs were found and a 404 error in the file watcher. After that, if you try to enable the “Auto Build” option again, it will not work. In addition, the project never builds again and remains in an “Unknown” state.
In Eclipse, the same thing happens, but there are no errors on the screen and the projects have a status of “No build information”.