Edgewall Software
Modify

Ticket #8696 (closed enhancement: fixed)

Opened 3 years ago

Last modified 20 months ago

diagrams for Trac request processing

Reported by: anatoly techtonik <techtonik@…> Owned by: Carsten Klein <carsten.klein@…>
Priority: normal Milestone: not applicable
Component: general Version: none
Severity: normal Keywords: devguide documentation
Cc: lists@…
Release Notes:
API Changes:

Description

As a potential plugin developer, I would really appreciate the diagram with the order of various components called when Trac processes request.

For example, to answer the question, that consequences has null Exception handler in this plugin:

http://trac-hacks.org/browser/noanonymousplugin/0.11/noanonymous/filter.py?rev=4369

Attachments

RequestHandling.png (74.2 KB) - added by Carsten Klein <carsten.klein@…> 2 years ago.
General Trac Request Handling

Download all attachments as: .zip

Change History

comment:1 Changed 3 years ago by cboos

  • Keywords devguide documentation added
  • Milestone set to 0.12.1

Well, nobody really knows what happens …

Changed 2 years ago by Carsten Klein <carsten.klein@…>

General Trac Request Handling

comment:2 Changed 2 years ago by Carsten Klein <carsten.klein@…>

See the attached file. It displays general trac request handling. Of course, there is a lot more going on during request dispatch, especially when it comes to the actual request handler in charge for processing the request.

I forgot to also have the owners displayed for each of the actors, however, these are basically
all from the trac.web.main and trac.web.api and trac.web.chrome modules.

comment:3 Changed 2 years ago by Carsten Klein <carsten.klein@…>

Regarding your question towards the noanonymous filter plugin. It is implemented in the wrong way. all of the code should go to pre_process_request, basically making it

   def pre_process_request(req, ...):

     if req.authenticate() == 'anonymous' and \
        not req.pathinfo.startswith("/login") and \
        not req.pathinfo.startswith("/resetpassword"):
        req.redirect(req.href.login())

comment:4 follow-up: Changed 2 years ago by Carsten Klein <carsten.klein@…>

ups it is of course req.authname instead of req.authenticate()

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

  • Milestone changed from next-minor-0.12.x to not applicable
  • Owner set to Carsten Klein <carsten.klein@…>

Thanks Carsten. Could you stick that diagram somewhere in an appropriate TracDev page (if none is fitting you can of course create a new one).

comment:6 Changed 2 years ago by anatoly techtonik <techtonik@…>

I second to thank you, Carsten. Very insightful. Now it is my problem to find some time to integrate this knowledge into NoAnonymous? practices. =)

comment:7 in reply to: ↑ 5 Changed 2 years ago by anatoly techtonik <techtonik@…>

Replying to cboos:

Could you stick that diagram somewhere in an appropriate TracDev page.

I believe it is already done 7 weeks ago at TracDev/RequestHandling

comment:8 in reply to: ↑ 4 Changed 2 years ago by anatoly techtonik <techtonik@…>

Replying to Carsten Klein <carsten.klein@…>:

ups it is of course req.authname instead of req.authenticate()

Actually I've implemented new version of the plugin as you recommended about the same time the ticket was created. The previous link was to old version, because of questionable exception handler. New version is here - http://trac-hacks.org/browser/noanonymousplugin/0.11/noanonymous/filter.py

It seems that the diagram can be broken into two for better screen alignment. One for project index request and one for the generic request. If there could be a source file for some sequence diagram tool like sdedit people could use it to improve the diagram.

Perhaps requests for static resources can also be presented as more detailed example.

comment:9 Changed 2 years ago by carsten.klein@…

The diagram was made using MagicDrawUML.
I will split the diagram into two distinct sequence diagrams, one for the project index and one for the generic request and post these here, incl. the MagicDrawUML file.

comment:10 Changed 2 years ago by Carsten Klein <carsten.klein@…>

I have update the wiki page and the diagrams there. Also included the original UML file (MagicDrawUML).

See TracDev/RequestHandling for more information.

Please note that some of the attachments there can be removed.

comment:11 Changed 20 months ago by Thijs Triemstra <lists@…>

  • Cc lists@… added

Guess this ticket can be closed then.

comment:12 Changed 20 months ago by rblank

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

comment:13 Changed 20 months ago by anatoly techtonik <techtonik@…>

Thanks.

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 Carsten Klein <carsten.klein@…>. 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.