Bug 841026

Summary: fix group queries to not return non-committed resources
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core ServerAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.4CC: ahovsepy, hrupp
Target Milestone: ---   
Target Release: JON 3.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 820981 Environment:
Last Closed: 2013-09-03 11:02:55 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 820981    
Bug Blocks: 819897    

Description John Mazzitelli 2012-07-17 18:07:58 EDT
+++ This bug was initially created as a clone of Bug #820981 +++

this issue was noticed while working on bug 819897 and a response to charles' comment #10 in that BZ:

> we shouldn't *ever* be showing 
> uncommitted resources in the regular inventory. The only place uncommitted 
> resources should appear is in the Import related resource lists.

I did a search in our java code for places where JPQL queries used the .implicitResources and .explicitResources collection and noticed many places where we don't filter out non-committed resources.

This issue is to correct and test those queries. We need good unit tests here because this is going to touch many group queries. Without good unit tests it would require good manual testing in the UI (which we will still do, but we need automated tests as well).

--- Additional comment from mazz@redhat.com on 2012-05-11 10:05:02 EDT ---

we also need to address bug 820716 since its related.

--- Additional comment from mazz@redhat.com on 2012-05-11 16:09:54 EDT ---

master commit: 3d1a2e5

this includes several more unit tests.

--- Additional comment from mazz@redhat.com on 2012-05-11 16:16:07 EDT ---

3f5f02c489179e81d783b49d8270ae869b74d404 fixes a test method name i forgot to change

--- Additional comment from mazz@redhat.com on 2012-05-14 11:15:34 EDT ---

git commit master: 5c02dfb fixes old unit tests that now have to make sure new resources created are in committed inventory state
Comment 1 John Mazzitelli 2012-07-18 12:31:32 EDT
the commits that have to go in to the release/jon3.1.x branch (3d1a, 3f5f, 5c02) are also listed in bug 819897 (which is the RHQ 4.5.0 BZ, the cloned JON 3.1.1 BZ is bug 820432).

So when I cherry-pick into the release branch for 820432, I will automatically pick up those three commits for this issue two. two-birds-one-stone.
Comment 2 John Mazzitelli 2012-07-18 12:36:42 EDT
from https://bugzilla.redhat.com/show_bug.cgi?id=820432#c6 :

commits to release/jon3.1.x:

65a890fa1f4084d26781aba3da0d06c1f38b6121
a20fedb416f53d49f89f8b1e32af3eb1ca53413a
81f7ea0d5078c6b470e9cc3342687e88170360e8
3d9da7710ed9c3f4857c3427c6e4c69cc8c58b23
ee6d6f6f063064f2a0336573c62eb9beb2b334eb
Comment 3 John Sanda 2012-08-02 14:51:58 EDT
JON 3.1.1 ER1 build is available. Moving to ON_QA.

https://brewweb.devel.redhat.com/buildinfo?buildID=226942
Comment 4 Armine Hovsepyan 2012-08-14 12:00:27 EDT
verified.

non-committed resources are not being added into groups for recursive inventory.
Comment 5 Heiko W. Rupp 2013-09-03 11:02:55 EDT
Bulk closing of old issues in VERIFIED state.