Bug 1256335 - default package-name-white-list is too restrictive
default package-name-white-list is too restrictive
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.2.0
Unspecified Unspecified
medium Severity medium
: DR2
: 6.3.0
Assigned To: Toni Rikkola
Lukáš Petrovický
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-24 07:32 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Enhancement
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2015-08-24 07:32:23 EDT
Description of problem:
When you create a new project, the package-name-white-list is created as well and filled with a default of <groupID>.<artifactId>.** which restricts the classes usable in any guided editor to those under that package.
User only trying out a few things will not even notice and just worry why the editors don't see the new Data Objects, if he creates them in package <groupID>.

For a user just trying out a few things, package-name-white-list won't be the first thing to check and fix and the dummy data objects probably won't be in the deepest package.
If someone creates a project actually meant for business, the package structure will change and the data objects probably won't go (only) into the <groupID>.<artifactId>.** packages. So a change to the package-name-white-list will be required again.

Keeping the package-name-white-list file empty might be a better default.


Version-Release number of selected component (if applicable):
6.2 ER1
Comment 1 manstis 2015-08-24 08:12:20 EDT
The package-name-white-list was added for https://bugzilla.redhat.com/show_bug.cgi?id=1155371 to limit the classes analysed. Simply defaulting to an empty file would only lead to this referenced BZ being re-opened. There needs to be a more intelligent solution. 

For example, when authoring classes using the Data Object Modeller we could add "new" packages automatically to the package-name-white-list. We could also provide the user with a "pick list" of packages contained in dependencies when added to the Project that would be appended to the package-name-white-list (i.e. "Please select the packages containing classes required for authoring..." type selector).

It would be good for you to liaise with Justin Holmes (reporter of the referenced BZ, jholmes@redhat.com) to agree a more complete and generally acceptable solution.
Comment 2 Zuzana Krejčová 2015-08-24 09:16:35 EDT
(In reply to manstis from comment #1)
> The package-name-white-list was added for
> https://bugzilla.redhat.com/show_bug.cgi?id=1155371 to limit the classes
> analysed. Simply defaulting to an empty file would only lead to this
> referenced BZ being re-opened. There needs to be a more intelligent
> solution. 
> 
> For example, when authoring classes using the Data Object Modeller we could
> add "new" packages automatically to the package-name-white-list. We could
> also provide the user with a "pick list" of packages contained in
> dependencies when added to the Project that would be appended to the
> package-name-white-list (i.e. "Please select the packages containing classes
> required for authoring..." type selector).
> 
> It would be good for you to liaise with Justin Holmes (reporter of the
> referenced BZ, jholmes@redhat.com) to agree a more complete and generally
> acceptable solution.

That sounds very interesting actually. I think it would make working with package-name-white-list and data objects much more pleasant. I'll get in touch with Justin Holmes.

Thanks for the reminder - I totally overlooked that default as being a part of that BZ. I think that the reason I haven't hit the same thing sooner is that earlier, when creating new project, the current package was set to be the deepest level created by default. Now it dropped me into the default (top most) package.. caught me by surprise. :-D
Comment 3 Justin Holmes 2015-08-24 20:48:04 EDT
Mich(In reply to manstis from comment #1)

> For example, when authoring classes using the Data Object Modeller we could
> add "new" packages automatically to the package-name-white-list. We could
> also provide the user with a "pick list" of packages contained in
> dependencies when added to the Project that would be appended to the
> package-name-white-list (i.e. "Please select the packages containing classes
> required for authoring..." type selector).

This is a solid approach, although I'm not sure what the workflow for such a prompt would be. 

In general, the goal of this feature is to help preserve performance when the KieModule's pom.xml is polluted with dependencies that are not needed for modeling (but perhaps for execution or testing). I don't want to prescribe an implementation, so let's take a behavior driven approach. IMHO there are two key scenarios here:


Given a KieModule loaded in Business Central
When loading the data model for guided editing takes less than 2 seconds
Then I should be able to see new data objects available as facts in the guided editor  

Given a KieModule loaded in Business Central
When loading the data model for guided editing takes more than 2 seconds
Then I should receive an alert that the data model has become polluted
And an administrator should be contacted with guidance on how to restrict the packages used in the data model


Let me know if you want to talk through these scenarios in more detail
Comment 4 Toni Rikkola 2016-01-22 05:37:40 EST
https://issues.jboss.org/browse/GUVNOR-2273

The latest changes change the package white list to white list all the models in the current project by default. Listing them in the white list file is no longer needed. Any packages from the dependencies still need to be white listed.

Note You need to log in before you can comment on or make changes to this bug.