Hello Everybody,
The new simplified subcategories are now in master, passed all the unit and integration
test, and were lightly tested by the team. So this change is slated for release in RHQ
4.12. This change impacts the plugin descriptor but plugin writers are not required to
update the plugin descriptors right away.
Here are the details:
1) <subcategory> tag on a parent resource is no longer required, nor used to derive
child subcategories
2) <subcategory> was marked as deprecated for the upcoming release; and will be
ignored by the plugin importer if found
3) If a plugin does not use nested subcategories, the only update would be remove
<subcategories> tag from the parent resource. And this clean-up is completely
optional for at least the next release.
4) If a plugin uses nested subcategories then (see example below):
a) if the plugin descriptor is left as is, the nesting will disappear and the all the
subresources will be place under the parent resource, under the leaf subcategory. The
plugin functionality will be unaffected.
b) plugin writers need to update the plugin descriptor to reflect the subcategory
nesting on the subCategory attribute of the resource in a pipe delimited format.
Here is the example of the nested subcategory:
Resource1 has Resource2 and Resource3 as children but with the following subcategory
structure:
Resource1
--> Subcategory1
----> Resource2
----> Subcategory2
------> Subcategory3
--------> Resource3
If no action is taken by the plugin writer, the tree structure will look like this:
Resource1
--> Subcategory1
----> Resource2
--> Subcategory3
----> Resource3
To get the same tree structure, the plugin writer has to update the subCategory attribute
of Resource2 and Resource3 and also optionally remove <subcategory> tag from
Resource1
Resource2 subCategory="Subcategory1"
Resource3 subCategory="Subcategory1|Subcategory2|Subcateg3"
In the entire RHQ code base there were only two plugins that made use of subcategory
nesting (AS5 and AS4) and in both case it was only one level deep. So from this limited
statistical sample, the actual general impact of this change on the community is minimal.
Please let me know if you have any question or need help transitioning the plugins to the
new subcategory structure.
Thank you,
Stefan Negrea
----- Original Message -----
From: "Stefan Negrea" <snegrea(a)redhat.com>
To: rhq-devel(a)lists.fedorahosted.org
Sent: Thursday, May 15, 2014 12:33:00 PM
Subject: Re: Resource Subcategories - Simplified
Hello Everybody,
Good news! After addressing the review comments, the pull request just landed
in master few minutes ago. Jay pulled the PR trigger (thanks!). I will
monitor the builds to ensure no errors due to this change landing in master.
The main driver for this change was to align RHQ AS7 plugin subcategories
with AS7 Admin Console interface. Going forward, the resource tree for AS7
servers resources (both standalone and domain) will mimic, with few
exceptions, the tree structure in the AS7 Admin Console.
If you have any questions or concerns about the change please feel free to
contact me.
Thank you,
Stefan Negrea
----- Original Message -----
> From: "Stefan Negrea" <snegrea(a)redhat.com>
> To: "rhq-devel" <rhq-devel(a)lists.fedorahosted.org>
> Sent: Thursday, April 17, 2014 3:38:38 PM
> Subject: Resource Subcategories - Simplified
>
> Hello Everybody,
>
> I've been working for a while on adding resource subcategories to the AS7
> plugin to simplify the resource tree. While on surface this would be simple
> change, just add subcategories to the plugin descriptor, the change is very
> very complicated. The current subcategory design is outdated due to the
> addition of the run-inside (multiple parents) feature. I've been trying to
> fix the current subcategory design from different angles but none worked so
> far. Mazz helped me along with reviews to my design progressions. This
> morning while on a call with Mazz, we had a small epiphany, let's solve
> everything by completely removing the current implementation.
>
> So here are the changes that I am currently working on:
> 1) Do not require parent resources to pre-declare all subcategories for
> children. This was done today with a top level <subcategories> tag.
> 2) The <subcategories> tag will be deprecated for the next release and will
> eventually be dropped in subsequent releases.
> 3) While deprecated, just ignore the <subcategories> tag.
> 4) The subcategories will be declared only the resources themselves via the
> subCategory attribute
> 5) For hierarchical categories allow a pipe delimited syntax
> subCategory="Subsystems|Test"
> 6) In the UI apply use the camel case syntax to make it more readable,
> TestSubsystems = Test Subsystems
> 7) Drop the entire subcategories entities and related tables. For now
> deprecated, and later completely remove the functionality.
> 8) Work on a database migration task to fold subcategories text into the
> resource types.
> 9) Update current RHQ plugins to remove the <subcategories> tag.
>
> Why the changes:
> 1) The current implementation is almost unused, none of the complicated
> structure is fully taken advantage of.
> 2) The current implementation is broken in so many ways, the run-inside
> really made the design obsolete and almost unfixable.
> 3) The current validation for subcategories (= they are declared on the
> parent) is really not needed. The only the actual resources that is placed
> on a subcategory needs to know about the subcategory.
> 4) The UI operates under the assumptions of a the simplified model. If a
> resource belongs to a category then create the UI resource tree
> accordingly.
> 5) Simple plugin structures makes it easy for community members to
> implement/fix plugins.
>
> Removing the current subcategory implementation is relatively easy because
> very little is actually used; it is mostly a liability. There were a couple
> of fixes applied over time around transactional boundaries that made the
> code very brittle. And after all this is done there is absolutely no change
> from a user perspective.
>
>
> To summarize the change:
> 1) Deprecate <subcategories> tag
> 2) Drop <subcategories> tag in future releases
> 2) Subcategories are set only via subCategory attribute
> 3) Pipe delimit hierarchies of subcategories and use camel case to improve
> legibility
> 4) Clean backend and existing plugins completely
> 5) No change for the users
>
>
> BZ:
>
https://bugzilla.redhat.com/show_bug.cgi?id=1069545
>
> Working pull request:
>
https://github.com/rhq-project/rhq/pull/22
>
>
>
> Thank you,
> Stefan Negrea
>
> Software Engineer
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel