Red Hat Bugzilla – Bug 645432
Add the ability to delete versions of bundles
Last modified: 2013-09-02 03:19:37 EDT
Description of problem:
Currently you can only delete the entire bundle (all versions), the ability to delete by versions is needed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Is there a workaround for this? Please advise.
going to mark this as ASSIGNED so we take a look at it in our next prioritization meeting.
git commit ebbeac6c225768c858efeb2a6c95037e67ef3d72
we can now delete bundle versions. However, I'm concerned that we should have some protections in place that might not be there. For example, if there is 1 or more deployments of the bundle version, I don't think we should be allowed to delete bundle versions. If we ever need to revert back, an error would occur.
So, I'm not sure that this issue can be closed yet. I have to look at it more closely to see if there is more to be done.
Here's the code that is relevant to my last comment about deployments - so it looks like we do clean up the DB. However, it means you will be orphaning deployments on the remote agents. for now this is probably good enough. I don't think we want to auto-undeploy these on the agents. We'll have to assume the user will do a full revert if they really don't want the agent machines to have these deployed. We'll have to make sure bug 645412 is also fixed, since that is needed to make sure the agent can be fully cleaned of any bundle deployment.
// deployments replace other deployments and have a self-referring FK. The deployments
// need to be removed in a way that will ensure that a replaced deployment is not removed
// prior to the replacer. To do this we'll just blanket update all the doomed deployments
// to break the FK dependency with nulls.
Query q = entityManager.createNamedQuery(BundleDeployment.QUERY_UPDATE_FOR_VERSION_REMOVE);
int rowsUpdated = q.executeUpdate();
// remove the bundle version - cascade remove the deployments which will cascade remove the resource deployments.
this was verified as part of RHQ 4.0 and 4.0.1 community releases
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.