Dexter, Gordon M. | 3 Jun 16:58 2010
Picon

[Trac-dev] Log concurrency issues?

I was looking into the logging code and I found that trac doesn't do much customization; just a standard python logging object.  That should work fine in some cases, since the Python logging object is thread-safe.  However it's not fully concurrency-safe for multiple processes, and we use Trac through mod_python, meaning there are always at least two apache processes running at any one time.  The trac log is env specific, but the environment isn't linked to a specific apache process, so it sounds like it's possible to lose log events.  Is there something I'm missing (e.g. special handling in mod_python) that prevents this?

--Gordon

--
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

Noah Kantrowitz | 3 Jun 18:49 2010
Picon

Re: [Trac-dev] Log concurrency issues?

You can always use a backend like syslog that prevents this if you are  
worried.

--Noah

On Jun 3, 2010, at 7:58 AM, Dexter, Gordon M. wrote:

> I was looking into the logging code and I found that trac doesn't do  
> much customization; just a standard python logging object.  That  
> should work fine in some cases, since the Python logging object is  
> thread-safe.  However it's not fully concurrency-safe for multiple  
> processes, and we use Trac through mod_python, meaning there are  
> always at least two apache processes running at any one time.  The  
> trac log is env specific, but the environment isn't linked to a  
> specific apache process, so it sounds like it's possible to lose log  
> events.  Is there something I'm missing (e.g. special handling in  
> mod_python) that prevents this?
>
> --Gordon
>
>
> -- 
> You received this message because you are subscribed to the Google  
> Groups "Trac Development" group.
> To post to this group, send email to trac-dev <at> googlegroups.com.
> To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com 
> .
> For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en 
> .

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

anatoly techtonik | 4 Jun 10:24 2010
Picon

[Trac-dev] Separate translation section for THANKS file

I wonder if it makes sense for proper attribution to separate people
who provide translations from those who sent patches to Trac code,
because making such patch requires significantly more efforts in
learning Trac code and toolchain than translations. It is not like
somebody will feel discouraged because of that, but this will give
them more points in their resumes.
-- 
anatoly t.

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

anatoly techtonik | 4 Jun 10:33 2010
Picon

Re: [Trac-dev] Log concurrency issues?

Can somebody explain in more detail about the problem with two Apache
processes writing to the same log file? Is it because two processes
can not open the same file for writing simultaneously? If that is the
case - what will happen if 2nd Trac tries to access the opened file -
is it paused until the lock is released or fails immediately? Is this
error written to Apache error.log or Trac somehow intercepts and stubs
it?

I'd like to receive all complete information if my Trac misbehaves, so
if some of this info is lost - it is definitely bad for developers and
admin troubleshooters.

-- 
anatoly t.

On Thu, Jun 3, 2010 at 7:49 PM, Noah Kantrowitz <noah <at> coderanger.net> wrote:
> You can always use a backend like syslog that prevents this if you are
> worried.
>
> --Noah
>
> On Jun 3, 2010, at 7:58 AM, Dexter, Gordon M. wrote:
>
>> I was looking into the logging code and I found that trac doesn't do much
>> customization; just a standard python logging object.  That should work fine
>> in some cases, since the Python logging object is thread-safe.  However it's
>> not fully concurrency-safe for multiple processes, and we use Trac through
>> mod_python, meaning there are always at least two apache processes running
>> at any one time.  The trac log is env specific, but the environment isn't
>> linked to a specific apache process, so it sounds like it's possible to lose
>> log events.  Is there something I'm missing (e.g. special handling in
>> mod_python) that prevents this?
>>
>> --Gordon
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Trac Development" group.
>> To post to this group, send email to trac-dev <at> googlegroups.com.
>> To unsubscribe from this group, send email to
>> trac-dev+unsubscribe <at> googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/trac-dev?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Development" group.
> To post to this group, send email to trac-dev <at> googlegroups.com.
> To unsubscribe from this group, send email to
> trac-dev+unsubscribe <at> googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/trac-dev?hl=en.
>
>

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

anatoly techtonik | 4 Jun 10:34 2010
Picon

Re: [Trac-dev] Log concurrency issues?

Is the problem actual for mod_wsgi?

It wouldn't hurt to add process id in Trac log anyway.
-- 
anatoly t.

On Thu, Jun 3, 2010 at 7:49 PM, Noah Kantrowitz <noah <at> coderanger.net> wrote:
> You can always use a backend like syslog that prevents this if you are
> worried.
>
> --Noah
>
> On Jun 3, 2010, at 7:58 AM, Dexter, Gordon M. wrote:
>
>> I was looking into the logging code and I found that trac doesn't do much
>> customization; just a standard python logging object.  That should work fine
>> in some cases, since the Python logging object is thread-safe.  However it's
>> not fully concurrency-safe for multiple processes, and we use Trac through
>> mod_python, meaning there are always at least two apache processes running
>> at any one time.  The trac log is env specific, but the environment isn't
>> linked to a specific apache process, so it sounds like it's possible to lose
>> log events.  Is there something I'm missing (e.g. special handling in
>> mod_python) that prevents this?
>>
>> --Gordon
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Trac Development" group.
>> To post to this group, send email to trac-dev <at> googlegroups.com.
>> To unsubscribe from this group, send email to
>> trac-dev+unsubscribe <at> googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/trac-dev?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Development" group.
> To post to this group, send email to trac-dev <at> googlegroups.com.
> To unsubscribe from this group, send email to
> trac-dev+unsubscribe <at> googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/trac-dev?hl=en.
>
>

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

Christian Boos | 4 Jun 10:54 2010
Picon

Re: [Trac-dev] Separate translation section for THANKS file

On 6/4/2010 10:24 AM, anatoly techtonik wrote:
> I wonder if it makes sense for proper attribution to separate people
> who provide translations from those who sent patches to Trac code,
> because making such patch requires significantly more efforts in
> learning Trac code and toolchain than translations. It is not like
> somebody will feel discouraged because of that, but this will give
> them more points in their resumes.
>    

No, it doesn't make sense. We don't keep track of what exactly people 
did to earn an entry in the THANKS file, except sometimes in the commit 
message. The only thing is that the contribution was deemed to be 
*significant*, that's all there is to it. Note that quite often, people 
who contributed translations have also contributed patches, so flagging 
someone as "translator" only would be wrong. Finally, as a translator 
myself, I can assure you that bringing a translation to a good quality 
level and complete coverage represents quite *more* work than the 
occasional bug fix ;-)

-- Christian

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

anatoly techtonik | 4 Jun 11:15 2010
Picon

[Trac-dev] Trac forms are not restored on browser crash

My FF crashes at least twice per week and now it did it while I was
editing a new page.
Usually FF restores text in TextAreas at the point of crash, but Trac
doesn't display any form.
It says "The page TracDev/TracURLs does not exist. You can create it here.".
Damn. I can't express how this suxx, because I've just lost a part of
research of TracURLs that
I've being written during the last hour. Another discouraging fact is
that I am not an English
native and it takes more effort for me to stack the words in correct order.

Damn.
-- 
anatoly t.

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

Mikael Relbe | 4 Jun 12:22 2010
Picon

[Trac] Announcement: TracTicketChangesetsPlugin, a new plugin for Trac 0.12

Hi all Trac friends

I am very pleased to announce my first ever plugin for Trac at Trac Hacks.

The TracTicketChangesetsPlugin hooks into changeset notifications and
searches commit messages for ticket references. Referenced tickets are
updated with the commit message, and all concerning changesets for a ticket
are presented in a separate section on ticket pages, just above the change
history section. 

The plugin works with multiple repositories. Language is translated if Babel
is installed. 

Please note: The plugin is not compatible with Trac 0.11 or older versions. 

See http://trac-hacks.org/wiki/TracTicketChangesetsPlugin for details.

The main reason for me creating this plugin was that a similar behaviour
have been added on existing Trac 0.11 sites that I am involved in, but as
part of commit hook scripts which updates a custom ticket field (which
contains all related revisions for the ticket). This has annoyed me for a
long time now, since that field was presented to the end-user among all
other ticket fields during edit. It looked quite ugly, and didn't allow for
intelligent actions when a commit message was altered afterwards. Trac 0.12
allows this to be solved in a very fashionable way, I think.

The source of this plugin is based on code distributed with Trac 0.12
(tracopt/ticket/commit_updater.py), and parts of DiscussionPlugin (database
upgrade handling) and the CloneTicketPlugin provided by Christian Boos.
Thanks to you all!

Since this is my first serious contribution, after have been spending some
time digging around the Trac code (and I am still in a learning process, and
will be for a long time) I would really appreciate constructive feedback
(and bug reports of course ;)

Sincerely yours,
Mikael Relbe

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@...
To unsubscribe from this group, send email to trac-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Steffen Hoffmann | 4 Jun 14:02 2010
Picon

Re: [Trac-dev] Announcement: TracTicketChangesetsPlugin, a new plugin for Trac 0.12


Hello,

Mikael Relbe wrote:
> Hi all Trac friends
>  
> I am very pleased to announce my first ever plugin for Trac at Trac Hacks.

Congratulation!

> The TracTicketChangesetsPlugin hooks into changeset notifications and
> searches commit messages for ticket references. Referenced tickets are
> updated with the commit message, and all concerning changesets for a ticket
> are presented in a separate section on ticket pages, just above the change
> history section. 
> 
> The plugin works with multiple repositories. Language is translated if Babel
> is installed. 

I seriously doubt this would work with current code. Did you test it?
Browsing the repo I failed to find a message catalog as well as the bare
minimum of configuration for generation/updating one. Importing a single
translation function is not enough. Consider reading the almost finished
i18n/l10n guide for Trac plugins:
 http://trac.edgewall.org/wiki/CookBook/PluginL10N

> [...]
> Since this is my first serious contribution, after have been spending some
> time digging around the Trac code (and I am still in a learning process, and
> will be for a long time) I would really appreciate constructive feedback
> (and bug reports of course ;)

I'd like to assist to get i18n support working and up to date.
Afterwards I'd love to add the message catalog to the Trac l10n project
 http://trac-hacks.org/wiki/TracPluginTranslation
for help with coordination and collection of translations via Transifex.
 Just the way Trac does it, but most helpful for a translator, who can
get plugin message catalogs from a single place now.

Sincerely

Steffen Hoffmann
Mikael Relbe | 4 Jun 14:36 2010
Picon

[Trac-dev] Re: Announcement: TracTicketChangesetsPlugin, a new plugin for Trac 0.12

> Congratulation!

Thank you!

> > The plugin works with multiple repositories. Language is translated if Babel
> > is installed.
>
> I seriously doubt this would work with current code. Did you test it?
> Browsing the repo I failed to find a message catalog as well as the bare
> minimum of configuration for generation/updating one. Importing a single
> translation function is not enough. Consider reading the almost finished
> i18n/l10n guide for Trac plugins:
>  http://trac.edgewall.org/wiki/CookBook/PluginL10N

Ah, but the trick was to only use existing strings used by the core of
Trac 0.12 ;)
I am the translator for the Swedish locale... So, yes it works!

BUT, you are nevertheless correct, there is one string (I think) that
goes untranslated, but this is not part of the normal use case (or
should not be very frequent at least). But that string is also the
same as in Trac core (tracopts/commit_updater, I don't know why that
string is not part of messages.pot).

The important strings that I've added -- the header of the new section
and a couple of other lingual expressions, that are frequent and will
show up with existing page content -- are all existing in messages.pot
and thus translated.

>
> I'd like to assist to get i18n support working and up to date.
> Afterwards I'd love to add the message catalog to the Trac l10n project
>  http://trac-hacks.org/wiki/TracPluginTranslation
> for help with coordination and collection of translations via Transifex.
>  Just the way Trac does it, but most helpful for a translator, who can
> get plugin message catalogs from a single place now.

I agree, I've seen that work has started with finding work methods for
translating plugins. I avoided this subject by careful selection of
the very few strings. Once that work has made progress, I will adapt
this plugin, of course.

>
> Sincerely
>
> Steffen Hoffmann

Thanks for the feedback!

  -- Mikael

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.


Gmane