Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Broken post-commit?

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


Trac-Mail at RevRagnarok

Jul 18, 2008, 7:17 AM

Post #1 of 5 (410 views)
Permalink
Broken post-commit?

Hi all,

Last night I got tired of waiting for Fedora to release a 0.11 RPM so I
installed trac manually. I am using the new WSGI interface and installed it
with easy_install. I already ran into the (dunno-who-to-blame's) bug where
Apache SetEnv for PYTHON_EGG_CACHE was being ignored unless I installed an
unzipped copy of Genshi. I did all kinds of tests on trac and was happy with
it. Installed the FullBlogPlugin and played with that a little; it's perfect
for my weekly summations for my customer.

This morning, when I tried to check in a file, TortoiseSVN said that the
commit failed, but it failed with HTTP/200 OK "error." So it didn't fail.
The trac post-commit hook must've ran, because the commit is in my
Timeline/Source Browser. There are no errors that I can see in my httpd
logs. But my local copy is now messed up because it thinks the commit
failed, so hasn't updated the local files.

Since the egg cache was an issue before, I tried adding:
export PYTHON_EGG_CACHE='/var/www/.python-eggs/'
to the post-commit script that calls trac-post-commit, but that didn't help.
So I edited the trac-post-commit file itself and added:
os.environ['PYTHON_EGG_CACHE']='/var/www/.python-eggs/'
which also didn't help. But again, I think the script itself is running
since the trac db gets an update.

Has anybody seen anything like this? Any ideas where I can start looking
for an actual error code? That machine is not online now so I can't do a
diff, but a quick check of
http://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hook shows
it didn't change in 15 months, so that should be OK, not sure tho.

Thanks!

Aaron

--~--~---------~--~----~------------~-------~--~----~
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 [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


oddsimons at gmail

Jul 18, 2008, 8:31 AM

Post #2 of 5 (384 views)
Permalink
Re: Broken post-commit? [In reply to]

On Jul 18, 4:17 pm, "Aaron D. Marasco" <Trac-M...@RevRagnarok.com>
wrote:
> I did all kinds of tests on trac and was happy with
> it. Installed the FullBlogPlugin and played with that a little; it's perfect
> for my weekly summations for my customer.

Yes, that sure is a nice plugin... ;-)

> This morning, when I tried to check in a file, TortoiseSVN said that the
> commit failed, but it failed with HTTP/200 OK "error." So it didn't fail.
> The trac post-commit hook must've ran, because the commit is in my
> Timeline/Source Browser. There are no errors that I can see in my httpd
> logs. But my local copy is now messed up because it thinks the commit
> failed, so hasn't updated the local files.
>
> Since the egg cache was an issue before, I tried adding:
> export PYTHON_EGG_CACHE='/var/www/.python-eggs/'
> to the post-commit script that calls trac-post-commit, but that didn't help.
> So I edited the trac-post-commit file itself and added:
> os.environ['PYTHON_EGG_CACHE']='/var/www/.python-eggs/'
> which also didn't help. But again, I think the script itself is running
> since the trac db gets an update.
>
> Has anybody seen anything like this? Any ideas where I can start looking
> for an actual error code? That machine is not online now so I can't do a
> diff, but a quick check ofhttp://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hookshows
> it didn't change in 15 months, so that should be OK, not sure tho.
>

I'm not sure what you are trying to do. The post-commit-hook is not at
all related to the Timeline/Browser for reading source and new
changesets - that access happens all through the python-subversion
bindings in code when requests to Trac are made.

That does not mean your script or installation does not have problems
of course. The script runs after a commit ('post'), so it will not
stop the commit from happening (as confirmed in the timeline). Also,
the 'HTTP/200 OK' is a web request status, and not I think directly
related to the status an individual post-commit hook.

Depending on setup, your Apache -> mod_svn -> post-commit-hook could
for instance be running in a different context from the mod_wsgi
process. If you remove the trac post-commit-hook, does your Tortoise/
Subversion setup work correctly? Do you have more than one Python
installed?

If things don't pan out, you need to do some logging and get more
details on the actual error that occurs.


:::simon

https://www.coderesort.com


--~--~---------~--~----~------------~-------~--~----~
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 [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Graham.Dumpleton at gmail

Jul 18, 2008, 8:18 PM

Post #3 of 5 (381 views)
Permalink
Re: Broken post-commit? [In reply to]

On Jul 19, 1:31 am, osimons <oddsim...@gmail.com> wrote:
> On Jul 18, 4:17 pm, "Aaron D. Marasco" <Trac-M...@RevRagnarok.com>
> wrote:
>
> > I did all kinds of tests on trac and was happy with
> > it. Installed the FullBlogPlugin and played with that a little; it's perfect
> > for my weekly summations for my customer.
>
> Yes, that sure is a nice plugin... ;-)
>
>
>
> >   This morning, when I tried to check in a file, TortoiseSVN said that the
> > commit failed, but it failed with HTTP/200 OK "error." So it didn't fail.
> > The trac post-commit hook must've ran, because the commit is in my
> > Timeline/Source Browser. There are no errors that I can see in my httpd
> > logs. But my local copy is now messed up because it thinks the commit
> > failed, so hasn't updated the local files.
>
> >   Since the egg cache was an issue before, I tried adding:
> > export PYTHON_EGG_CACHE='/var/www/.python-eggs/'
> > to the post-commit script that calls trac-post-commit, but that didn't help.
> > So I edited the trac-post-commit file itself and added:
> > os.environ['PYTHON_EGG_CACHE']='/var/www/.python-eggs/'
> > which also didn't help. But again, I think the script itself is running
> > since the trac db gets an update.
>
> >   Has anybody seen anything like this? Any ideas where I can start looking
> > for an actual error code? That machine is not online now so I can't do a
> > diff, but a quick check ofhttp://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hooks...
> > it didn't change in 15 months, so that should be OK, not sure tho.
>
> I'm not sure what you are trying to do. The post-commit-hook is not at
> all related to the Timeline/Browser for reading source and new
> changesets - that access happens all through the python-subversion
> bindings in code when requests to Trac are made.
>
> That does not mean your script or installation does not have problems
> of course. The script runs after a commit ('post'), so it will not
> stop the commit from happening (as confirmed in the timeline). Also,
> the 'HTTP/200 OK' is a web request status, and not I think directly
> related to the status an individual post-commit hook.
>
> Depending on setup, your Apache -> mod_svn -> post-commit-hook could
> for instance be running in a different context from themod_wsgi
> process. If you remove the trac post-commit-hook, does your Tortoise/
> Subversion setup work correctly? Do you have more than one Python
> installed?
>
> If things don't pan out, you need to do some logging and get more
> details on the actual error that occurs.

If they are running mod_wsgi, not surprised that:

SetEnv for PYTHON_EGG_CACHE

doesn't work as can't do that with mod_wsgi. That is a specific hack
for mod_python adapter last time I looked.

Graham


--~--~---------~--~----~------------~-------~--~----~
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 [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


noah at coderanger

Jul 18, 2008, 8:25 PM

Post #4 of 5 (376 views)
Permalink
Re: Broken post-commit? [In reply to]

Graham Dumpleton wrote:
>
>
> On Jul 19, 1:31 am, osimons <oddsim...@gmail.com> wrote:
>> On Jul 18, 4:17 pm, "Aaron D. Marasco" <Trac-M...@RevRagnarok.com>
>> wrote:
>>
>>> I did all kinds of tests on trac and was happy with
>>> it. Installed the FullBlogPlugin and played with that a little; it's perfect
>>> for my weekly summations for my customer.
>> Yes, that sure is a nice plugin... ;-)
>>
>>
>>
>>> This morning, when I tried to check in a file, TortoiseSVN said that the
>>> commit failed, but it failed with HTTP/200 OK "error." So it didn't fail.
>>> The trac post-commit hook must've ran, because the commit is in my
>>> Timeline/Source Browser. There are no errors that I can see in my httpd
>>> logs. But my local copy is now messed up because it thinks the commit
>>> failed, so hasn't updated the local files.
>>> Since the egg cache was an issue before, I tried adding:
>>> export PYTHON_EGG_CACHE='/var/www/.python-eggs/'
>>> to the post-commit script that calls trac-post-commit, but that didn't help.
>>> So I edited the trac-post-commit file itself and added:
>>> os.environ['PYTHON_EGG_CACHE']='/var/www/.python-eggs/'
>>> which also didn't help. But again, I think the script itself is running
>>> since the trac db gets an update.
>>> Has anybody seen anything like this? Any ideas where I can start looking
>>> for an actual error code? That machine is not online now so I can't do a
>>> diff, but a quick check ofhttp://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hooks...
>>> it didn't change in 15 months, so that should be OK, not sure tho.
>> I'm not sure what you are trying to do. The post-commit-hook is not at
>> all related to the Timeline/Browser for reading source and new
>> changesets - that access happens all through the python-subversion
>> bindings in code when requests to Trac are made.
>>
>> That does not mean your script or installation does not have problems
>> of course. The script runs after a commit ('post'), so it will not
>> stop the commit from happening (as confirmed in the timeline). Also,
>> the 'HTTP/200 OK' is a web request status, and not I think directly
>> related to the status an individual post-commit hook.
>>
>> Depending on setup, your Apache -> mod_svn -> post-commit-hook could
>> for instance be running in a different context from themod_wsgi
>> process. If you remove the trac post-commit-hook, does your Tortoise/
>> Subversion setup work correctly? Do you have more than one Python
>> installed?
>>
>> If things don't pan out, you need to do some logging and get more
>> details on the actual error that occurs.
>
> If they are running mod_wsgi, not surprised that:
>
> SetEnv for PYTHON_EGG_CACHE
>
> doesn't work as can't do that with mod_wsgi. That is a specific hack
> for mod_python adapter last time I looked.

The autogenerated wsgi script makes the correct pkg_resources API call
to set this.

--Noah
Attachments: signature.asc (0.24 KB)


Trac-Mail at RevRagnarok

Jul 19, 2008, 4:19 AM

Post #5 of 5 (369 views)
Permalink
Re: Broken post-commit? [In reply to]

(Multiple replies combined)

On Fri, Jul 18, 2008 at 11:31 AM, osimons <oddsimons [at] gmail> wrote:

>
> On Jul 18, 4:17 pm, "Aaron D. Marasco" <Trac-M...@RevRagnarok.com>
> wrote:
> > I did all kinds of tests on trac and was happy with
> > it. Installed the FullBlogPlugin and played with that a little; it's
> perfect
> > for my weekly summations for my customer.
>
> Yes, that sure is a nice plugin... ;-)


Thanks! Some day I will update my personal blog server (blog.revragnarok.com)
to 0.11 and that plugin.


> I'm not sure what you are trying to do. The post-commit-hook is not at
> all related to the Timeline/Browser for reading source and new
> changesets - that access happens all through the python-subversion
> bindings in code when requests to Trac are made.


Yeah, I was confused. I had thought that was how trac got its database
updated, which is why you manually run "resync" if there's an issue.

The final problem was that I was wrong - even tho the post-commit hook
hasn't changed in 15 months, it was still newer than what I had.

Because of this problem, I have two suggestions for "the powers that be:"
1. Add an Id keyword to trac-post-commit-hook so people can easily see if
they have the right version.
2. Distribute trac-post-commit-hook in the egg version (somehow, I know
nothing about eggs)

---

On Fri, Jul 18, 2008 at 11:18 PM, Graham Dumpleton <
Graham.Dumpleton [at] gmail> wrote:

>
> On Jul 19, 1:31 am, osimons <oddsim...@gmail.com> wrote:
> > On Jul 18, 4:17 pm, "Aaron D. Marasco" <Trac-M...@RevRagnarok.com>
> > wrote:
>
> If they are running mod_wsgi, not surprised that:
>
> SetEnv for PYTHON_EGG_CACHE
>
> doesn't work as can't do that with mod_wsgi. That is a specific hack
> for mod_python adapter last time I looked.
>

Right, with wsgi I set it in trac.wsgi. Sorry for the confusion - I had
noted the bug even tho it really had nothing to do with the problem, I more
threw it out there in case somebody searched for Fedora who was having
problems to leave a breadcrumb.

---

As always, thanks for the help! I don't think the suggestions above are
really ticket-worthy, and I am not sure if the second one has already been
discussed among the developers.

Aaron

--~--~---------~--~----~------------~-------~--~----~
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 [at] googlegroups
To unsubscribe from this group, send email to trac-users-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.