Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036112
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2017-05-25 19:242017-09-28 18:14
ReportershuehnerView Statuspublic 
Assigned Toinigosanchez 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisionbd3b87f44dea
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036112: excludeFilter + manual db object creation does not work when installing module during install.source

DescriptionWhen a module for a specific reason needs to create the database object manually (i.e. because update.database does not support a feature) that is possible by using combination of
a.) excludeFilter xml entry
b.) ModuleScript doing manual ddl (i.e. create function)

That does not work when installing module directly during install.source see below for longer version.

During a normal module installation with update.database that causes following steps
a.) update.database itself does not touch the excluded objects
b.) ModuleScript running during update.database creates extra objects
c.) end of update.database db-checksum is calculated
=> Checksum + database are in sync

However when placing a module in modules/ folder and running install.source sequence is different
1.) create.database creates all normal objects + calculates checksum
=> here checksum is in sync with database
2.) during import.sampledata modulescripts are run creating extra db objects
=> now database is no longer in sync with stored checksum
Steps To Reproducei.e. clone following snapshot from swf-utils report useing CodeSnapshot.sh tool
delivery_pilot_6/Snapshot_Q2_20170512_01 (needs pg>=9.5)

a.)
Run install.source
run update.database
It will fail with local changes

b.)
Running install.source without running modulescript
running update.database
=> No local changes

that *but.migration module inside shows the reported issue
Proposed SolutionRecalculate checksum at end of install.source to ensure it is in sync even when structure is modified during modulescripts
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0036137 closedinigosanchez Openbravo ERP [SER-QA 2918] Config script removeCheckChange are not applied on install.source 
has duplicate defect 0036865 closedinigosanchez Openbravo ERP false DB modified positive detected after compile.complete having the activiti module 
related to defect 0036885 closedinigosanchez Modules Remove a call to the DBSMOBUtil.getInstance().updateCRC(platform) deprecated method. 

-  Notes
(0096821)
shuehner (administrator)
2017-05-25 19:24

Notes:
-> skip modulescripts during install.source -> should still run update checksum
-> run import.sampledata manually (i.e. to add whitevalley sampledata) after installing retail -> should we run checksum again?
(0099066)
inigosanchez (developer)
2017-09-15 11:41
edited on: 2017-09-18 17:31

Test plan:
- Common case: Execute normal install.source execution -> Result of ad_db_modified() execution -> N
- Reported case: Execute install.source task having a modulescript that creates a table (the table should be added to excludeFilter too -> as a excludedTable). Result of ad_db_modified() execution -> N
- DBSMTestSuite suite is executed successfully -> OK


The checksum always is in sync (at end of install.source) even when db structure is modified during modulescripts.

(0099089)
hgbot (developer)
2017-09-18 09:34

Repository: erp/devel/dbsm-main
Changeset: 2a50ac50cac648856f3dcfb2838c847d3644a0d8
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Sep 14 13:22:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/2a50ac50cac648856f3dcfb2838c847d3644a0d8 [^]

Related with issue 36112: code clean up

- The hasBeenModified method had several outdate code. Remove all unused code.
- The getDependencyHashMap() private method is unused locally: removed it. Also remove all code
which was only used by that method: another private method called getDependencyForPrefix().
- Remove private vector: idDependantModules. It is unused.

---
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
M src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0099090)
hgbot (developer)
2017-09-18 09:34

Repository: erp/devel/dbsm-main
Changeset: 59bf74769dd565c6be611f7e6ee52bdc75eb30e9
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Sep 15 13:45:58 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/59bf74769dd565c6be611f7e6ee52bdc75eb30e9 [^]

Related with issue 36112: deprecated two methods in DBSMOBUtil

These two methods are deprecated because platform is not used in the code:
- updateCRC(Platform platform)
- hasBeenModified(Platform platform, OBDataset dataset, boolean updateCRC)

They are maintained in the code as deprecated in order to maintain backwards compatibility
and to ensures that the API is not broken.

---
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
M src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
M src/org/openbravo/ddlutils/task/ExportConfigScript.java
M src/org/openbravo/ddlutils/task/ExportDatabase.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0099091)
hgbot (developer)
2017-09-18 09:34

Repository: erp/devel/dbsm-main
Changeset: 036c566707b4bd4c6ca6c6c129d38c1b2adda59f
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Sep 15 13:47:05 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/036c566707b4bd4c6ca6c6c129d38c1b2adda59f [^]

Fixed issue 36112: Checksum is updated properly on install source task

The problem was that checksum was not updated on install source task. The problem was
in ImportSampledata because this task can execute module scripts that modifies the
database. (e.g. create or modified a table).

The problem has been resolved by take into account this situation. Now the checksum is
calculated after the modules script are executed.

---
M src/org/openbravo/ddlutils/task/ImportSampledata.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0099092)
hgbot (developer)
2017-09-18 09:41

Repository: erp/devel/pi
Changeset: bd3b87f44dea7e6ced05c0023c5755ad4cfafdd3
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Mon Sep 18 09:40:40 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bd3b87f44dea7e6ced05c0023c5755ad4cfafdd3 [^]

Fixed issue 36112: Checksum is updated properly on install source task

The problem was that checksum was not updated on install source task. The problem was
in ImportSampledata because this task can execute module scripts that modifies the
database. (e.g. create or modified a table).

The problem has been resolved by take into account this situation. Now the checksum is
calculated after the modules script are executed.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099401)
hudsonbot (developer)
2017-09-21 16:50

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test
(0099475)
caristu (developer)
2017-09-22 11:28

Minor code review improvements:

https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0099483)
hgbot (developer)
2017-09-22 13:20

Repository: erp/devel/dbsm-main
Changeset: f9da225c2a26bb499efa0e1f6a3eb336ec5c353f
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Sep 22 13:00:43 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/f9da225c2a26bb499efa0e1f6a3eb336ec5c353f [^]

Related with issue 36112: Minor code review improvements

- Some typos are fixed.
- Improved the name of a method.
- Use getLog().error instead of System.out.
- Now invokeAdDbModified method only execute ad_db_modify('N'). Updated its name to isAdDbModified. Reverted changes in updatedCRC method.

---
M src/org/openbravo/ddlutils/task/ImportSampledata.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0099485)
hgbot (developer)
2017-09-22 13:33

Repository: erp/devel/pi
Changeset: 262f8744d1996bf16276a989e7305a9fe1f7b99f
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Sep 22 13:14:08 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/262f8744d1996bf16276a989e7305a9fe1f7b99f [^]

Related with issue 36112: Minor code review improvements

- Some typos are fixed.
- Improved the name of a method.
- Use getLog().error instead of System.out.
- Now invokeAdDbModified method only execute ad_db_modify('N'). Updated its name to isAdDbModified. Reverted changes in updatedCRC method.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099551)
hudsonbot (developer)
2017-09-25 14:30

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/d8fd6d1ecc14 [^]
Maturity status: Test
(0099625)
hgbot (developer)
2017-09-27 11:39

Repository: erp/devel/dbsm-main
Changeset: 8d4e306dd2a7d479d1e5c7efde5291f885c3cf2d
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed Sep 27 10:35:08 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/8d4e306dd2a7d479d1e5c7efde5291f885c3cf2d [^]

Related with issue 36112: code review improvements

- Improved a message in ImportSampledata.
- Deprecated hasBeenModified(OBDataset, boolean) method because boolean is not used anymore.

---
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
M src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
M src/org/openbravo/ddlutils/task/ImportSampledata.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0099626)
hgbot (developer)
2017-09-27 11:43

Repository: erp/devel/pi
Changeset: 813c115641f1117953b683f25356083861357b24
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed Sep 27 11:23:03 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/813c115641f1117953b683f25356083861357b24 [^]

Related with issue 36112: code review improvements

- Improved a message in ImportSampledata.
- Deprecated hasBeenModified(OBDataset, boolean) method because boolean is not used anymore.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099642)
hgbot (developer)
2017-09-28 10:03

Repository: erp/devel/dbsm-main
Changeset: 7e65e43ae85c33b8918975c3493a813541e5ba41
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Sep 28 09:44:55 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/7e65e43ae85c33b8918975c3493a813541e5ba41 [^]

Related with bug 36112: Remove deprecated method introduced in the code cleanup

Remove deprecated method that was included as a part of the code cleanup of this issue. For this reason, the method can be removed.

---
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0099643)
hgbot (developer)
2017-09-28 10:11

Repository: erp/devel/pi
Changeset: 7e1efd1528f2ba85da80fb5391394d5dfa24f097
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Sep 28 09:48:22 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7e1efd1528f2ba85da80fb5391394d5dfa24f097 [^]

Related with bug 36112: Remove deprecated method introduced in the code cleanup

Remove deprecated method that was included as a part of the code cleanup of this issue. For this reason, the method can be removed.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099657)
hudsonbot (developer)
2017-09-28 15:35

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/269dfb9e8626 [^]
Maturity status: Test
(0099659)
hudsonbot (developer)
2017-09-28 15:35

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/269dfb9e8626 [^]
Maturity status: Test
(0099666)
caristu (developer)
2017-09-28 18:14

Reviewed + tested OK.

- Issue History
Date Modified Username Field Change
2017-05-25 19:24 shuehner New Issue
2017-05-25 19:24 shuehner Assigned To => platform
2017-05-25 19:24 shuehner Modules => Core
2017-05-25 19:24 shuehner Triggers an Emergency Pack => No
2017-05-25 19:24 shuehner Note Added: 0096821
2017-06-02 11:27 alostale Status new => acknowledged
2017-06-02 11:27 alostale Relationship added related to 0036137
2017-09-11 15:54 inigosanchez Status acknowledged => scheduled
2017-09-11 15:54 inigosanchez Assigned To platform => inigosanchez
2017-09-15 11:41 inigosanchez Note Added: 0099066
2017-09-15 11:41 inigosanchez Review Assigned To => caristu
2017-09-15 12:35 caristu Relationship added related to 0036865
2017-09-18 09:34 hgbot Checkin
2017-09-18 09:34 hgbot Note Added: 0099089
2017-09-18 09:34 hgbot Checkin
2017-09-18 09:34 hgbot Note Added: 0099090
2017-09-18 09:34 hgbot Checkin
2017-09-18 09:34 hgbot Note Added: 0099091
2017-09-18 09:34 hgbot Status scheduled => resolved
2017-09-18 09:34 hgbot Resolution open => fixed
2017-09-18 09:34 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/036c566707b4bd4c6ca6c6c129d38c1b2adda59f [^]
2017-09-18 09:41 hgbot Checkin
2017-09-18 09:41 hgbot Note Added: 0099092
2017-09-18 09:41 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/dbsm-main/rev/036c566707b4bd4c6ca6c6c129d38c1b2adda59f [^] => http://code.openbravo.com/erp/devel/pi/rev/bd3b87f44dea7e6ced05c0023c5755ad4cfafdd3 [^]
2017-09-18 13:49 inigosanchez Relationship replaced has duplicate 0036865
2017-09-18 17:31 inigosanchez Note Edited: 0099066 View Revisions
2017-09-19 10:30 inigosanchez Relationship added related to 0036885
2017-09-21 16:50 hudsonbot Checkin
2017-09-21 16:50 hudsonbot Note Added: 0099401
2017-09-22 11:28 caristu Note Added: 0099475
2017-09-22 12:28 caristu Status resolved => new
2017-09-22 12:28 caristu Resolution fixed => open
2017-09-22 12:46 inigosanchez Status new => scheduled
2017-09-22 13:20 hgbot Checkin
2017-09-22 13:20 hgbot Note Added: 0099483
2017-09-22 13:33 hgbot Checkin
2017-09-22 13:33 hgbot Note Added: 0099485
2017-09-22 13:34 inigosanchez Status scheduled => resolved
2017-09-22 13:34 inigosanchez Resolution open => fixed
2017-09-25 14:30 hudsonbot Checkin
2017-09-25 14:30 hudsonbot Note Added: 0099551
2017-09-27 11:39 hgbot Checkin
2017-09-27 11:39 hgbot Note Added: 0099625
2017-09-27 11:43 hgbot Checkin
2017-09-27 11:43 hgbot Note Added: 0099626
2017-09-28 10:03 hgbot Checkin
2017-09-28 10:03 hgbot Note Added: 0099642
2017-09-28 10:11 hgbot Checkin
2017-09-28 10:11 hgbot Note Added: 0099643
2017-09-28 15:35 hudsonbot Checkin
2017-09-28 15:35 hudsonbot Note Added: 0099657
2017-09-28 15:35 hudsonbot Checkin
2017-09-28 15:35 hudsonbot Note Added: 0099659
2017-09-28 18:14 caristu Note Added: 0099666
2017-09-28 18:14 caristu Status resolved => closed
2017-09-28 18:14 caristu Fixed in Version => 3.0PR17Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker