Bug 991059

Summary: Deployment units - wrong version after server restart
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED CURRENTRELEASE QA Contact: Zuzana Krejčová <zkrejcov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: david, lpetrovi, rzhang
Target Milestone: ER2   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:17:35 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:
Embargoed:

Description Zuzana Krejčová 2013-08-01 13:41:32 UTC
Description of problem:
If you modify a project that was already deployed and then deploy it again (under the same GAV), you will see the changes made. If you then restart the server, the changes to this deployment unit are missing.

Users will want to deploy projects with the same GAV if there was some mistake that is very quick to fix, other projects depend on this same version, etc. It simply can and will happen. So, having these changes and fixes reverted by server restart is quite unfortunate.

Furthermore and especially for process management:
If you happen to add a new process, deploy the project and start an instance of the new process, you will face problems. Once you restart the server, the instance will still be running, but the process definition for this instance won't be available. This means the instance cannot be aborted. If you leave an instance running, you cannot undeploy or redeploy the project.


Version-Release number of selected component (if applicable):
kie-wb CR1, BPMS 6 DR6


How reproducible:


Steps to Reproduce:
1. Build and deploy a project.
2. Modify the project (add a process) and build & deploy again, under the same GAV.
3. Look into the process management - definitions, you'll see the new process there.
4. Restart the server, look into the process management - definitions again.


Actual results:
The newly added process is not there - the previous version of the project was deployed.


Expected results:
The updated version of the project was deployed, the new process is shown.


Additional info:

Comment 1 Maciej Swiderski 2013-08-07 09:49:21 UTC
Issue was caused due to the way how maven works from different angels (deploy artifacts and resolve artifacts):
1. Guvnor does deploy it only to remote repository - on build and deploy time
2. kie-services when deploying to runtime engine use maven to resolve given artifact which will get the artifact from maven remote repository if does not exists in local

so on the second deploy to remote repo with the same GAV step 2 did not take it from remote repo anymore as it had it already in local - maven does not load it when same GAV already exists in local repo (except snapshots which are loaded base on defined policy).

Fix for this is that now guvnor will install artifact to local repo during maven deploy phase so local repo is always up to date.

Commit in 6.0.x branch:
https://github.com/droolsjbpm/guvnor/commit/baf7ead8a9c026b73b8030f9f0e7a00ef0570aab