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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045855
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2021-02-04 15:012021-07-21 16:27
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in VersionPR21Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045855: ant package.module duplicates check run during export.database + depends on code planned to be removed

Descriptionant 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 ReproduceCheck 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)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0047414 closedalostale ant package.module -Dmodule not working in Oracle 

-  Notes
(0125989)
hgbot (developer)
2021-02-04 17:45

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/305 [^]
(0126000)
hgbot (developer)
2021-02-05 07:29

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/305 [^]
(0126005)
hgbot (developer)
2021-02-05 07:29

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 0526cf6fb41254b0cf3743c14d1c69bbf4e11030
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-02-04T17:40:00+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/0526cf6fb41254b0cf3743c14d1c69bbf4e11030 [^]

Fixes ISSUE-45855. Remove calling DatabaseValidor from package.module

ant package.module runs validations for the module before creating the
obx file.
That has 2 parts:
a.) ModuleValidator
b.) DatabaseValidator

The DatabaseValidator checks are also run during export.database (for
the module being exported). So with the typical sequence of
export.database and then package.module same topics are checks twice.

As the code in this task for DatabaseValidator or blocking removal of
lots of otherwise obsolete code inside dbsourcemanager stop calling the
b.) from ant package.module and rely on people using the WARNings
already shown during export.database.

---
M src/org/openbravo/service/system/SystemValidationTask.java
---
(0130671)
hgbot (developer)
2021-07-21 16:27

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: abeb37c0aa31c1f825839304bbd21a8bd40f4963
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-07-21T12:48:22+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/abeb37c0aa31c1f825839304bbd21a8bd40f4963 [^]

fixes BUG-47422, backports BUG-45855: can't package module in ORA

Packaging modules in Oracle failed during the model validation step,
this step was removed by BUG-45855. This commit backports that change.

---
M src/org/openbravo/service/system/SystemValidationTask.java
---
(0130673)
hgbot (developer)
2021-07-21 16:27

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: abeb37c0aa31c1f825839304bbd21a8bd40f4963
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-07-21T12:48:22+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/abeb37c0aa31c1f825839304bbd21a8bd40f4963 [^]

fixes BUG-47422, backports BUG-45855: can't package module in ORA

Packaging modules in Oracle failed during the model validation step,
this step was removed by BUG-45855. This commit backports that change.

---
M src/org/openbravo/service/system/SystemValidationTask.java
---

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker