Kallithea issues archive

Issue #197: Pull Request broken after upgrade from 0.2 to 0.3

Reported by: Claude Chausse-ccr
State: closed
Created on: 2016-02-28 18:01
Updated on: 2016-02-29 11:02

Description

I did an upgrade of my kallithea server and now any pull-request actor is generating an exception

Error - <type 'exceptions.AttributeError'>: 'PullRequest' object has no attribute 'author'

As a note: The upgrade-db part said that my database was at VERSION 31 already and that it was already at the latest version.

Is there something missing in my db ?

Attachments

Comments

Comment by Thomas De Schampheleire, on 2016-02-28 18:20

That is unexpected, we have not had reports about such an issue and 0.3 is out for a while now.

Could you send a full stack trace and a description of the action that led to it?

How are you installing Kallithea? Via pip or via the source repo?

Which database are you using?

Comment by Claude Chausse-ccr, on 2016-02-28 19:18

Thank you for this quick response.

I use mysql, and I use a virtualenv and I installed/upgraded via pip

Actually, I have other attributes that are not found. I am not sure what you mean by full stack trace. Here is trace I have when just trying to view an existing pull request

2016-02-28 14:15:17.596 INFO [kallithea.lib.base] IP: 10.60.100.152 User: <AuthUser('id:3[chaussec] auth:True')> accessed /my_pullrequests 2016-02-28 14:15:17.630 INFO [kallithea.lib.auth] user <AuthUser('id:3[chaussec] auth:True')> authenticated with regular auth @ PullrequestsController:show_my 2016-02-28 14:15:17.930 INFO [kallithea.RequestWrapper] IP: 10.60.100.152 Request to /my_pullrequests time: 0.712s 2016-02-28 14:15:23.985 INFO [kallithea.lib.base] IP: 10.60.100.152 User: <AuthUser('id:3[chaussec] auth:True')> accessed /scm/hg/product/moonraker/firmware.hg/pull-request/225//TP_23464_Implement_GPIO_menus 2016-02-28 14:15:24.047 INFO [kallithea.lib.auth] user <AuthUser('id:3[chaussec] auth:True')> authenticated with regular auth @ PullrequestsController:show Error - <type 'exceptions.AttributeError'>: 'module' object has no attribute 'tooltip' 2016-02-28 14:15:26.150 INFO [kallithea.lib.base] IP: 10.60.100.152 User: <AuthUser('id:3[chaussec] auth:True')> accessed /scm/hg/product/moonraker/firmware.hg/pull-request/225//TP_23464_Implement_GPIO_menus 2016-02-28 14:15:26.178 INFO [kallithea.RequestWrapper] IP: 10.60.100.152 Request to /scm/hg/product/moonraker/firmware.hg/pull-request/225/_/TP_23464_Implement_GPIO_menus time: 2.366s

Comment by Claude Chausse-ccr, on 2016-02-28 19:21

Maybe this is what you are looking for

URL: http://mon-scm-repos:8080/scm/hg/product/moonraker/firmware.hg/pull-request/225/_/TP_23464_Implement_GPIO_menus Module weberror.errormiddleware:171 in call

app_iter = self.application(environ, sr_checker) Module kallithea.lib.middleware.sessionmiddleware:62 in call return self.wrap_app(environ, session_start_response) Module routes.middleware:131 in call response = self.app(environ, start_response) Module pylons.wsgiapp:103 in call response = self.dispatch(controller, environ, start_response) Module pylons.wsgiapp:313 in dispatch return controller(environ, start_response) Module kallithea.lib.base:446 in call return WSGIController.call(self, environ, start_response) Module pylons.controllers.core:214 in call response = self.dispatch_call() Module pylons.controllers.core:164 in _dispatch_call response = self._inspect_call(func) Module pylons.controllers.core:107 in _inspect_call result = self._perform_call(func, args) Module pylons.controllers.core:57 in _perform_call return func(args) Module ?:2 in show Module kallithea.lib.auth:800 in __wrapper return func(*fargs, fkwargs) Module ?:2 in show Module kallithea.lib.auth:847 in __wrapper return func(fargs, fkwargs) Module kallithea.controllers.pullrequests:702 in show return render('/pullrequests/pullrequest_show.html') Module pylons.templating:244 in render_mako cache_type=cache_type, cache_expire=cache_expire) Module pylons.templating:219 in cached_template return render_func() Module pylons.templating:241 in render_template return literal(template.render_unicode(globs)) Module mako.template:452 in render_unicode as_unicode=True) Module mako.runtime:803 in _render *_kwargs_for_callable(callable, data)) Module mako.runtime:835 in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) Module mako.runtime:855 in _exec_template _render_error(template, context, compat.exception_as()) Module mako.runtime:864 in _render_error result = template.error_handler(context, error) Module pylons.error:22 in handle_mako_error raise (exc, None, sys.exc_info()[2]) AttributeError: 'module' object has no attribute 'tooltip'

Comment by Claude Chausse-ccr, on 2016-02-29 03:38

Finally after deleting my data directory, everything got fixed.

Comment by Thomas De Schampheleire, on 2016-02-29 09:28

It's odd; there must have been some kind of corruption in your data directory. As said, we have not heard any reports of this kind before. Thanks for reporting back!

Comment by Thomas De Schampheleire, on 2016-02-29 09:28

Problem solved and not assumed to be a real problem in Kallithea.

Comment by Mads Kiilerich, on 2016-02-29 11:02

The internal html templates are converted to Python and stored in the data directory - and rebuilt and updated on demand. This mechanism must somehow have been tricked into not detecting the need for an update. Perhaps a weird issue with permissions ... or perhaps more likely that timestamps got out of sync?