All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request] michaelw/toastertable/sorting-cache-hit
@ 2015-07-14 16:55 Michael Wood
  2015-07-15 12:37 ` Damian, Alexandru
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Wood @ 2015-07-14 16:55 UTC (permalink / raw)
  To: toaster@yoctoproject.org


poky-contrib branch: michaelw/toastertable/sorting-cache-hit

commit 548636b2c9a7be82bc098596c4e08ab156863e5b
Author: Michael Wood <michael.g.wood@intel.com>
Date:   Tue Jul 14 17:42:56 2015 +0100

     bitbake: toastergui: Toastertables don't replace dash in cache key

     The dash character was being stripped from the cache key when we 
sanitise
     it for the memcache backend. This meant that we were getting a 
false hit
     on the cache and returning non descending results which are 
indicated by
     the dash prefix on the field name.

     Signed-off-by: Michael Wood <michael.g.wood@intel.com>

diff --git a/bitbake/lib/toaster/toastergui/widgets.py 
b/bitbake/lib/toaster/toastergui/widgets.py
index 5f6b47b..0885402 100644
--- a/bitbake/lib/toaster/toastergui/widgets.py
+++ b/bitbake/lib/toaster/toastergui/widgets.py
@@ -252,8 +252,8 @@ class ToasterTable(TemplateView):
          for key, val in kwargs.iteritems():
              cache_name = cache_name + str(key) + str(val)

-        # No special chars allowed in the cache name
-        cache_name = re.sub(r'[^A-Za-z0-9]', "", cache_name)
+        # No special chars allowed in the cache name apart from dash
+        cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
          data = cache.get(cache_name)

          if data:



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [review-request] michaelw/toastertable/sorting-cache-hit
  2015-07-14 16:55 [review-request] michaelw/toastertable/sorting-cache-hit Michael Wood
@ 2015-07-15 12:37 ` Damian, Alexandru
  2015-07-28 13:41   ` Damian, Alexandru
  0 siblings, 1 reply; 3+ messages in thread
From: Damian, Alexandru @ 2015-07-15 12:37 UTC (permalink / raw)
  To: Michael Wood; +Cc: toaster@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

Seems fine to me.


On Tue, Jul 14, 2015 at 5:55 PM, Michael Wood <michael.g.wood@intel.com>
wrote:

>
> poky-contrib branch: michaelw/toastertable/sorting-cache-hit
>
> commit 548636b2c9a7be82bc098596c4e08ab156863e5b
> Author: Michael Wood <michael.g.wood@intel.com>
> Date:   Tue Jul 14 17:42:56 2015 +0100
>
>     bitbake: toastergui: Toastertables don't replace dash in cache key
>
>     The dash character was being stripped from the cache key when we
> sanitise
>     it for the memcache backend. This meant that we were getting a false
> hit
>     on the cache and returning non descending results which are indicated
> by
>     the dash prefix on the field name.
>
>     Signed-off-by: Michael Wood <michael.g.wood@intel.com>
>
> diff --git a/bitbake/lib/toaster/toastergui/widgets.py
> b/bitbake/lib/toaster/toastergui/widgets.py
> index 5f6b47b..0885402 100644
> --- a/bitbake/lib/toaster/toastergui/widgets.py
> +++ b/bitbake/lib/toaster/toastergui/widgets.py
> @@ -252,8 +252,8 @@ class ToasterTable(TemplateView):
>          for key, val in kwargs.iteritems():
>              cache_name = cache_name + str(key) + str(val)
>
> -        # No special chars allowed in the cache name
> -        cache_name = re.sub(r'[^A-Za-z0-9]', "", cache_name)
> +        # No special chars allowed in the cache name apart from dash
> +        cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
>          data = cache.get(cache_name)
>
>          if data:
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>



-- 
Alex Damian
Yocto Project
SSG / OTC

[-- Attachment #2: Type: text/html, Size: 2691 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [review-request] michaelw/toastertable/sorting-cache-hit
  2015-07-15 12:37 ` Damian, Alexandru
@ 2015-07-28 13:41   ` Damian, Alexandru
  0 siblings, 0 replies; 3+ messages in thread
From: Damian, Alexandru @ 2015-07-28 13:41 UTC (permalink / raw)
  To: Michael Wood; +Cc: toaster@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

Taken for submission,

Alex

On Wed, Jul 15, 2015 at 1:37 PM, Damian, Alexandru <
alexandru.damian@intel.com> wrote:

> Seems fine to me.
>
>
> On Tue, Jul 14, 2015 at 5:55 PM, Michael Wood <michael.g.wood@intel.com>
> wrote:
>
>>
>> poky-contrib branch: michaelw/toastertable/sorting-cache-hit
>>
>> commit 548636b2c9a7be82bc098596c4e08ab156863e5b
>> Author: Michael Wood <michael.g.wood@intel.com>
>> Date:   Tue Jul 14 17:42:56 2015 +0100
>>
>>     bitbake: toastergui: Toastertables don't replace dash in cache key
>>
>>     The dash character was being stripped from the cache key when we
>> sanitise
>>     it for the memcache backend. This meant that we were getting a false
>> hit
>>     on the cache and returning non descending results which are indicated
>> by
>>     the dash prefix on the field name.
>>
>>     Signed-off-by: Michael Wood <michael.g.wood@intel.com>
>>
>> diff --git a/bitbake/lib/toaster/toastergui/widgets.py
>> b/bitbake/lib/toaster/toastergui/widgets.py
>> index 5f6b47b..0885402 100644
>> --- a/bitbake/lib/toaster/toastergui/widgets.py
>> +++ b/bitbake/lib/toaster/toastergui/widgets.py
>> @@ -252,8 +252,8 @@ class ToasterTable(TemplateView):
>>          for key, val in kwargs.iteritems():
>>              cache_name = cache_name + str(key) + str(val)
>>
>> -        # No special chars allowed in the cache name
>> -        cache_name = re.sub(r'[^A-Za-z0-9]', "", cache_name)
>> +        # No special chars allowed in the cache name apart from dash
>> +        cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
>>          data = cache.get(cache_name)
>>
>>          if data:
>>
>> --
>> _______________________________________________
>> toaster mailing list
>> toaster@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/toaster
>>
>
>
>
> --
> Alex Damian
> Yocto Project
> SSG / OTC
>



-- 
Alex Damian
Yocto Project
SSG / OTC

[-- Attachment #2: Type: text/html, Size: 3458 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-28 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 16:55 [review-request] michaelw/toastertable/sorting-cache-hit Michael Wood
2015-07-15 12:37 ` Damian, Alexandru
2015-07-28 13:41   ` Damian, Alexandru

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.