Edgewall Software
Modify

Ticket #8203 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Internal error when using multirepos, in search

Reported by: unik@… Owned by: cboos
Priority: high Milestone: 0.12-multirepos
Component: search system Version: none
Severity: normal Keywords: multirepos search
Cc:
Release Notes:
API Changes:

Description

Error text:

AttributeError: 'NoneType' object has no attribute 'authz'

Traceback:

File "/usr/lib/python2.6/site-packages/Trac-0.12multirepos_r0-py2.6.egg/trac/web/main.py", line 459, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.6/site-packages/Trac-0.12multirepos_r0-py2.6.egg/trac/web/main.py", line 214, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.6/site-packages/Trac-0.12multirepos_r0-py2.6.egg/trac/search/web_ui.py", line 113, in process_request
  results += list(source.get_search_results(req, terms, filters))
File "/usr/lib/python2.6/site-packages/Trac-0.12multirepos_r0-py2.6.egg/trac/versioncontrol/web_ui/changeset.py", line 1036, in get_search_results
  if not repos.authz.has_permission_for_changeset(rev):

Host information:

  • Linux 2.6.28 (Gentoo)
  • Apache 2.2.11
  • Python 2.6.1
  • Subversion 1.6.0 (DSO disabled, didn't work otherwise)
  • mod_wsgi 2.3 (daemon mode)
  • Genshi SVN rev 1052
  • Pygments 1.0
  • Trac multirepos branch SVN rev 8087
  • SQLite 3.6.12
  • pysqlite 2.4.1

Other info:

Error didn't happen when repo cache was empty (ie. it was searching the wiki just fine).

Attachments

Change History

comment:1 Changed 3 years ago by cboos

  • Milestone set to 0.12
  • Priority changed from normal to high

Reproduced, thanks for the report!

comment:2 follow-up: Changed 3 years ago by cboos

Should be fixed by [8088], thanks for the report!

That changeset is interesting, as it highlights the 3 things left to be done for MultiRepos (besides what's already listed in #7723):

  • get rid of the legacy svn authz stuff and use the new permission system instead (a sample IPermissionPolicy plugin should be made in order to reimplement the svn authz stuff)
  • the Trac modules shouldn't know about the details of the cache. This implies that the changeset ISearchSource should delegate the search to each repository.
  • finally, I'm not happy with the "composite ids" used for changeset and source resources, and I think it would be cleaner to use repository resources, changeset and source resources being children resource of their repository.


comment:3 in reply to: ↑ 2 Changed 3 years ago by cboos

  • Resolution set to fixed
  • Status changed from new to closed

Replying to cboos:

3 things left to be done for MultiRepos (besides what's already listed in #7723):

  • get rid of the legacy svn authz stuff and use the new permission system instead (a sample IPermissionPolicy plugin should be made in order to reimplement the svn authz stuff)

That's now tracked in #7116.

  • the Trac modules shouldn't know about the details of the cache. This implies that the changeset ISearchSource should delegate the search to each repository.

Not sure anymore about this one. If the revision table can be used by most of the backends, then things can stay as they are.

  • finally, I'm not happy with the "composite ids" used for changeset and source resources, and I think it would be cleaner to use repository resources, changeset and source resources being children resource of their repository.

That's now tracked in #7706.

The bug reported in this ticket was fixed by r8088, closing.

comment:4 Changed 3 years ago by rblank

  • Owner set to cboos

comment:5 Changed 2 years ago by cboos

  • Milestone changed from 0.12 to 0.12-multirepos
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.