#709: Troubleshoot DB upgrades to detect product names in product column
(0.8-dev)
---------------------------+----------------------------
  Reporter:  olemis        |      Owner:  nobody
      Type:  defect        |     Status:  new
  Priority:  minor         |  Milestone:  Unscheduled
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  upgrade, admin
---------------------------+----------------------------
Changes (by olemis):

 * component:   => multiproduct
 * priority:  major => minor
 * keywords:   => upgrade, admin
 * milestone:   => Unscheduled
 * owner:   => nobody


Old description:

> Initially the value of product column was assigned with product name .
> This was changed afterwards to use product prefix . In an instance
> upgraded from 0.5 up to 0.8-dev I noticed this error.
>
> [[span(Log entry, class=label label-info)]]
> {{{
> 2013-11-04 19:52:34,287 Trac[web_ui] ERROR: - f9068b8c-84fd-4c5f-
> a5a5-47c7b4968428 - Error rendering widget TicketQuery with options
> {'args': {'max': 10, 'query':
> 'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone',
> 'title': 'Active Tickets'}}
> }}}
>

> [[span(Traceback, class=label label-info)]]
> {{{#!py
>
> Traceback (most recent call last):
>   File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/web_ui.py",
> line 269, in _render_widget
>     return wp.render_widget(name, ctx, options)
>   File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/util.py",
> line 132, in widget_name_checker
>     return f(self, name, *args, **kwargs)
>   File
> "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/widgets/query.py",
> line 100, in render_widget
>     data = qrymdl.process_request(fakereq, self.env)[1]
>   File
> "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
> line 163, in process_request
>     result = super(ProductQueryModule, self).process_request(req)
>   File "/path/to/bloodhound/trac/trac/ticket/query.py", line 968, in
> process_request
>     return self.display_html(req, query)
>   File "/path/to/bloodhound/trac/trac/ticket/query.py", line 1066, in
> display_html
>     tickets = query.execute(req)
>   File
> "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
> line 138, in execute
>     row[product_idx], val)
>   File
> "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
> line 76, in _get_ticket_href
>     env = lookup_product_env(self.env, prefix)
>   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
> line 927, in lookup_env
>     return ProductEnvironment(global_env, prefix)
>   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
> line 371, in __call__
>     return f(self, g_env, *args, **kwargs)
>   File
> "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/cache.py", line
> 67, in wrapper
>     result = user_function(*args, **kwds)
>   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
> line 395, in __call__
>     return ComponentMeta.__call__(self, *args, **kwargs)
>   File "/path/to/bloodhound/trac/trac/core.py", line 140, in __call__
>     self.__init__(*args, **kwargs)
>   File "/path/to/bloodhound/trac/trac/core.py", line 107, in new_init
>     original_init(self, *args, **kwargs)
>   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
> line 550, in __init__
>     raise LookupError("Missing product %s" % (product,))
> LookupError: Missing product <product name>
> }}}
>
> The same problem made global /query page crash . Considering this it
> seems that upgrade procedure (once upon a time) left these entries
> behind.
>
> In any case /query must still work even if some entries in the DB are
> corrupted . A second take on this might consist in detecting such entries
> and offer a TracAdmin command to fix dangling ticket references.

New description:

 Initially the value of product column was assigned with product name .
 This was changed afterwards to use product prefix . In an instance
 upgraded from 0.5 up to 0.8-dev I noticed this error.

 [[span(Log entry, class=label label-info)]]
 {{{
 2013-11-04 19:52:34,287 Trac[web_ui] ERROR: - f9068b8c-84fd-4c5f-
 a5a5-47c7b4968428 - Error rendering widget TicketQuery with options
 {'args': {'max': 10, 'query':
 
'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone',
 'title': 'Active Tickets'}}
 }}}


 [[span(Traceback, class=label label-info)]]
 {{{#!py

 Traceback (most recent call last):
   File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/web_ui.py",
 line 269, in _render_widget
     return wp.render_widget(name, ctx, options)
   File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/util.py",
 line 132, in widget_name_checker
     return f(self, name, *args, **kwargs)
   File
 "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/widgets/query.py",
 line 100, in render_widget
     data = qrymdl.process_request(fakereq, self.env)[1]
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
 line 163, in process_request
     result = super(ProductQueryModule, self).process_request(req)
   File "/path/to/bloodhound/trac/trac/ticket/query.py", line 968, in
 process_request
     return self.display_html(req, query)
   File "/path/to/bloodhound/trac/trac/ticket/query.py", line 1066, in
 display_html
     tickets = query.execute(req)
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
 line 138, in execute
     row[product_idx], val)
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
 line 76, in _get_ticket_href
     env = lookup_product_env(self.env, prefix)
   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
 line 927, in lookup_env
     return ProductEnvironment(global_env, prefix)
   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
 line 371, in __call__
     return f(self, g_env, *args, **kwargs)
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/cache.py", line
 67, in wrapper
     result = user_function(*args, **kwds)
   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
 line 395, in __call__
     return ComponentMeta.__call__(self, *args, **kwargs)
   File "/path/to/bloodhound/trac/trac/core.py", line 140, in __call__
     self.__init__(*args, **kwargs)
   File "/path/to/bloodhound/trac/trac/core.py", line 107, in new_init
     original_init(self, *args, **kwargs)
   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
 line 550, in __init__
     raise LookupError("Missing product %s" % (product,))
 LookupError: Missing product <product name>
 }}}

 The same problem made global /query page crash . Considering this it seems
 that upgrade procedure (once upon a time) left these entries behind.

 In any case /query must still work even if some entries in the DB are
 corrupted . A second take on this might consist in detecting such entries
 and offer a TracAdmin command (or a script in contrib) to fix dangling
 ticket references.

--

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/709#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to