git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fwd: git-daemon access-hook race condition

From
ESEugene Sajine <euguess@gmail.com>
Date
Sep 12, 2013, 18:51 UTC
Message-ID
<CAPZPVFbJqbRGQZ+m3-EfahcYegPvVcS-jNTsCXxBqWUsLqyHkg@mail.gmail.com>
In-Reply-To
<CAPZPVFa=gqJ26iA6eQ1B6pcbTcQmmnXHYz6OQLtMORnAa5ec2w@mail.gmail.com>
Hi,

We are serving repos in closed netwrok via git protocol. We are using git-daemon access hook (thank you very much for such a great feature) in order to create push notifications for Jenkins. I.e. upon the push the access-hook is called and then the curl command is created and executed. As we have several instances of Jenkins, that we need to notify (three), the execution of the access-hook can take some time.

Sometimes we have a situation when the whole chain works fine but Jenkins git plugin doesn't recognize the changes. I think it happens because we hit a kind of race condition:

1. Incoming push triggers access-hook
2. notify jenkins 1
3. notify jenkins 2
4. jenkins 1 polls repo but sees no changes
5. notify Jenkins 3
6. the push data transfer finishes - consequent pushes will find
changes w/o any problem
The question is:

Is there a way to avoid that? Is it possible to have access-hook to be executed after receive? Is it possible to introduce a parameter that would specify if it needs to be executed before receive or after?

Thanks, Eugene

Next: Junio C Hamano
Message 1 of 10 in “Fwd: git-daemon access-hook race condition”
  1. Eugene SajineSep 12, 2013
  2. Junio C HamanoSep 12, 2013
  3. Fwd: Fwd: git-daemon access-hook race conditionEugene Sajine, Sep 12, 2013
  4. Junio C HamanoSep 12, 2013
  5. Eugene SajineSep 12, 2013
  6. Eugene SajineSep 12, 2013
  7. Eugene SajineSep 13, 2013
  8. Junio C HamanoSep 12, 2013
  9. Eugene SajineSep 12, 2013
  10. Junio C HamanoSep 12, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.