Schizofrenic package version creation

John Mazzitelli mazz at redhat.com
Thu Mar 3 14:11:33 UTC 2011


put that in a BZ - this has to be cleaned up before GA release since it 
involves a remote API.

In fact, we should have a BZ to document that fact we need to go through 
all the remote APIs and make sure they are correct and consistent

On 03/03/2011 06:03 AM, Lukas Krejci wrote:
> For some strange reason, we have 2 methods for creating a new package version.
>
> ContentManagerRemote.createPackageVersion() and
> ContentManagerLocal.getUploadedPackageVersion()
>
> The only important semantical difference between these two methods, I think,
> is this:
>
> createPackageVersion doesn't update the bits or any other details of the
> package from the provided inputstream if the package version already exists,
> whereas getUploadPackageVersion updates them.
>
> This is quite important difference, yet these two methods are used seemingly
> interchangeably throughout the code.
>
> (the other difference is that getUploadedPackageVersion() needs to be provided
> with additional details like SHA, etc., whereas createPackageVersion()
> computes them.)
>
> I'd suggest we check all the usages of these two methods with the above
> difference in mind.
>
> For example ResourceFactoryManagerBean.createResource() chooses one or the
> other of the above methods based on fact if the caller provided a map with the
> additional details which I think is wrong.
>
> I'm not sure I know all the consequences of changing the behavior of any of
> these methods, so I'm asking here.
>
> Cheers,
>
> Lukas
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


More information about the rhq-devel mailing list