Re: [Spacewalk-devel] [PATCH] Use braces for accessing composite types in PG

2012-11-02 Thread Johannes Renner
On 10/31/2012 05:00 PM, Tomas Lestach wrote:
> On Wednesday 31 of October 2012 14:38:49 Johannes Renner wrote:
>> Hey,
>>
>> Ok, here is the patch to make the rewritten query work with PG as well (API
>> call 'system.listLatestUpgradablePackages'). It's actually a follow up to
>> this commit:
>>
>> 4823565b2e634bc73010d366ff82c432630bca85
>>
> 
> Committed as: 594781171402e28f85cdcb9fe7e838e35288a505
> 
>> It was strange though when testing it: for most of my systems it returned
>> really quick (with 0 results though), but I also had one system, where the
>> query did not return at all, even after 1 hour! You might want to do some
>> additional performance testing here. There was nothing special about this
>> specific host though, it was even subscribed to a base channel only..
> 
> Can you still reproduce it with that system?

I could reproduce it until I cherry-picked your most recent fix from master:

1168f61a9d16b42b533a21513c8538529862e745

The fixed query now runs reasonably fast and delivers results immediately for
that specific system. So I'd consider this issue as fixed.

Thanks,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] List of installable packages: API vs. Web UI

2012-11-02 Thread Johannes Renner
On 11/01/2012 01:59 PM, Tomas Lestach wrote:
> On Wednesday 31 of October 2012 15:00:48 Johannes Renner wrote:
>> Hello,
>>
>> We found that the list of installable packages for a given system differs if
>> you either ask the API (via system.listLatestInstallablePackages) or if you
>> go to the Web UI (Systems -> [choose a system] -> Software -> Packages ->
>> Install).
>>
>> After looking into it, I found there is two different queries used for this
>> (both to be found in Package_queries.xml):
>>
>> 1. system_latest_all_available_packages (API)
>> 2. system_available_packages (Web UI)
>>
>> My questions:
>>
>> - Query (1.) seems to return all available versions of a package, which
>> means 'all' rather than 'latest'? I think we could have two separate API
>> calls, one for 'latest' and one for 'all', but 'latest_all'?
> 
> Right, the naming is strange.
> 
>> - Shouldn't we use the same query for API and Web UI in order to get the
>> same results here?
> 
> I'd say we do not want to get the same results.
> As people are used to the WebUI, they may select and install any version of 
> an 
> available package. I wouldn't change that.
> 
> If an API is called listLatestInstallablePackages, it shall definitelly 
> return 
> list of *latest* installable packages.
> 
> But what we could do is we can introduce a 
> listAllInstallablePackages/listAvailableInstallablePackages API, that could 
> reuse the WebUI query. :-)

Haha, yes, good idea ;-)

So, IIUC this is the situation summarized:

The current API call needs to continue to exist as it is, but you agree that
the naming of the API call, as well as the query name, is strange.

To fix this, we would actually rename the existing API call to something more
'correct', like e.g. 'listAllInstallablePackages'. Further we could change the
semantics of 'listLatestInstallablePackages' in a way that it reuses the WebUI
query and thus will return the same results as the WebUI itself.

The only problem is that we are most likely not supposed to change the semantics
of an existing API call, right? Is this true, even if we considered such
'unexpected' behavior as a bug?

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel