Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0045855 | Openbravo ERP | A. Platform | public | 2021-02-04 15:01 | 2021-07-21 16:27 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | shuehner | |||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | PR21Q2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0045855: ant package.module duplicates check run during export.database + depends on code planned to be removed | |||||||||||
Description | ant package.module tasks by default also runs validations for the module to be packaged (SystemValidationTask with type="module") Part of this is running the checks implemented in DatabaseValidator. The code in SystemValidationTask is using obsolete code inside dbsourcemanager planned to be removed (loadModelFromDatabase with prefix parameter used in past by update.database.mod) The same checks from DatabaseValidator are also already running during export.database (by default, can be optionally disabled). So running those checks again in package.module is conceptually duplicated. There is one small behavior difference: - from ExportDatabase 5 checks are classified as WARNing and do not stop the task - from ant package.module those 5 checks are classified as ERROR and do stop the task The 5 checks are same 'topic' for different areas: - Table XX does have element YY which does not start with the database prefix of the module. - With is them implemented for: Primary Key, Foreign Key, Check Constraint, Unique Constraint, Index So removing this duplicate checks changes behavior by allowing: - Ignore WARN during update.database (intentionally or accidentally) - And let default run of package.module continue instead of blocking it by default Raising the WARN to ERROR inside ExportDatabase would stop task immediately when processing the module. As export.database is often called with multiple modules in development that is probably a bit harmful (i.e. in CI) by only showing first error (instead of all of them) Note: For Openbravo managed modules that should not have practical effect as our CI systems raises those WARNings which are expected to be fixed anyway. | |||||||||||
Steps To Reproduce | Check DatabaseValidator being used in both ExportDatabase.java (dbsm repo) and SystemValidationTask (type=module) which is called via 'ant package.module task definition). Behavior different above is via calling (or not) setDbsmExecution. | |||||||||||
Proposed Solution | - Remove calling DatabaseValidator from SystemValidationTask (type module) - Accept the behavior change that developers are expected to notice the WARNings anyway Alternative solution to stop using the obsolete dbsourcemanager code-path (while keeping behavior): - Replace deprecated loadModel (with prefix filter) - By loading full model + filtering it afterwards (same as ExportDatabase already does) - Check if PL-Standardization (which would run for the full model) can be switched of (if not needed by the validator) or pay the performance cost and make package.module slower - Probably not a good idea with mass-publishing modules during release cycle by development teams (calling package.module in a loop would multiply that time penalty) | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2021-02-04 15:01 | shuehner | New Issue | ||||||||||
2021-02-04 15:01 | shuehner | Assigned To | => platform | |||||||||
2021-02-04 15:01 | shuehner | Modules | => Core | |||||||||
2021-02-04 15:01 | shuehner | Triggers an Emergency Pack | => No | |||||||||
2021-02-04 15:05 | shuehner | Proposed Solution updated | ||||||||||
2021-02-04 17:45 | hgbot | Note Added: 0125989 | ||||||||||
2021-02-05 07:29 | hgbot | Note Added: 0126000 | ||||||||||
2021-02-05 07:29 | hgbot | Resolution | open => fixed | |||||||||
2021-02-05 07:29 | hgbot | Status | new => closed | |||||||||
2021-02-05 07:29 | hgbot | Fixed in Version | => PR21Q2 | |||||||||
2021-02-05 07:29 | hgbot | Note Added: 0126005 | ||||||||||
2021-02-05 07:48 | alostale | Assigned To | platform => shuehner | |||||||||
2021-07-21 09:12 | alostale | Relationship added | related to 0047414 | |||||||||
2021-07-21 16:27 | hgbot | Note Added: 0130671 | ||||||||||
2021-07-21 16:27 | hgbot | Note Added: 0130673 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|