Bug 1045095

Summary: Incremental build fails intermittently when creating a new project
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED CURRENTRELEASE QA Contact: Zuzana Krejčová <zkrejcov>
Severity: low Docs Contact:
Priority: medium    
Version: 6.0.0CC: etirelli, jlocker, lpetrovi
Target Milestone: ER1   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:54:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Zuzana Krejčová 2013-12-19 15:16:44 UTC
Description of problem:
When creating a new project, incremental build is requested. 6 times. Sometimes, some of these builds can fail. Fortunately, this isn't a problem since nothing breaks in the GUI at this point, but it creates an unnecessary and confusing mess in the server log:

  ERROR [org.uberfire.backend.server.AbstractWatchService] (org.uberfire.backend.server.IOWatchServiceNonDotImpl(WatchService{FileSystem=git://localhost:9418/test})) Unexpected error during WatchService events fire.: org.guvnor.common.services.shared.exceptions.GenericPortableException
(No further information is given in the message, no 'Caused by' section.)

  WARN  [org.drools.compiler.kie.builder.impl.AbstractKieModule] (pool-14-thread-1) No files found for KieBase defaultKieBase

  ERROR [org.guvnor.common.services.builder.BuildServiceImpl] (pool-14-thread-1)  : input contained no data: com.thoughtworks.xstream.io.StreamException:  : input contained no data
...
  Caused by: java.io.EOFException: input contained no data
...
  ERROR [org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder] (pool-14-thread-1)  : input contained no data: org.guvnor.common.services.shared.exceptions.GenericPortableException:  : input contained no data


What actually happens is this:
1. File kmodule.xml is created, with no content. Commit is made with this.
2. This triggers an incremental build.
3. Initial content is written to kmodule.xml and comitted.
4. This, again, triggers an incremental build.

5. File pom.xml is created, with no content, commited to git.
6. Incremental build.
7. Initial content is written to pom.xml and comitted.
8. Incremental build.

9. File project.imports created, no content, commit.
10. Incremental build.
11. Initial content written to project.imports, commitd.
12. Incremental build.


What, I think, causes these errors:
Sometimes, in steps 2, 6 & 10, the incremental build actually happens after the next step (3, 7, 11) - so the app manages to put the right valid content into the file, or perhaps the incremental build happens after all is done - all files created and with valid content. Then it is ok and you see no errors.
BUT - sometimes, the requested inc. build is run BEFORE that. And you try to build project with empty pom.xml, project.imports or kmodule.xml. In that case, those files are invalid and so the inc. build fails.


I'd like to propose this:
If at all possible, don't request inc. build for a project that is still being created. Perhaps simply doing one commit for all of this, or at least only one commit per file would suffice (related issue in bug 1021406).


Version-Release number of selected component (if applicable):
BPMS 6.0 ER5

Comment 1 manstis 2013-12-19 19:13:08 UTC
Toni, this should be addressed by use of the batch-commit when saving/creating a Project (that I think you've completed).

Comment 2 Toni Rikkola 2014-03-11 10:37:40 UTC
All the files for the project are now committed in one go.

Comment 3 Zuzana Krejčová 2014-05-22 14:35:28 UTC
Verified with ER2 - one commit per new project, haven't seen any failed incremental build.