[Buildbot] #2418: Can't sort SourceStamp listing in Jinja2 build.html template

Buildbot trac trac at buildbot.net
Tue Jul 1 13:29:43 UTC 2014


#2418: Can't sort SourceStamp listing in Jinja2 build.html template
-------------------------+-----------------------------------
Reporter:  mikesorrenti  |       Owner:
    Type:  enhancement   |      Status:  closed
Priority:  minor         |   Milestone:  0.8.x (unmaintained)
 Version:  0.8.7p1       |  Resolution:  wontfix
Keywords:  web           |
-------------------------+-----------------------------------
Changes (by dustin):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  0.9.+ => 0.8.x (unmaintained)


Old description:

> Our buildbot installation is used for several codebases so our
> !SourceStamp listing on the individual build pages gets lengthy. I tried
> using Jinja2's sort method to sort this listing by the codebase attribute
> but failed:
> {{{
> <type 'exceptions.AttributeError'>: SourceStamp instance has no attribute
> '__getitem__'
> }}}
>

> Jinja2 sorting happens in filters.py at do_sort, using
> environment.getitem to attempt to retrieve the attribute via bracket
> notation:
> {{{
> # Jinja2 2.6 environment.py line 353
> return obj[argument]
> }}}
>
> I attempted to add a simple `__getitem__` method to my local
> sourcestamp.!SourceStamp but no dice, are the historical !SourceStamp
> objects serialized or something like that?

New description:

 Our buildbot installation is used for several codebases so our
 !SourceStamp listing on the individual build pages gets lengthy. I tried
 using Jinja2's sort method to sort this listing by the codebase attribute
 but failed:
 {{{
 <type 'exceptions.AttributeError'>: SourceStamp instance has no attribute
 '__getitem__'
 }}}


 Jinja2 sorting happens in filters.py at do_sort, using environment.getitem
 to attempt to retrieve the attribute via bracket notation:
 {{{
 # Jinja2 2.6 environment.py line 353
 return obj[argument]
 }}}

 I attempted to add a simple `__getitem__` method to my local
 sourcestamp.!SourceStamp but no dice, are the historical !SourceStamp
 objects serialized or something like that?

--

--
Ticket URL: <http://trac.buildbot.net/ticket/2418#comment:5>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list