reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
45 stars 37 forks source link

External Async Post Receive Hook run synchronouslly #97

Closed estebangit closed 4 years ago

estebangit commented 4 years ago

Bitbucket server V6.4.0 External Hooks V6.6.0-1

Since we upgraded from the free version (3.4-1) of the plugin to the payed one, our External Async Post receive hooks are executed in a synchronous mode. This causes huge delays for all the git push.

seletskiy commented 4 years ago

@estebangit: Hi, thanks for the report. Post-receive hook is now running in sync mode due internal changes made by Atlassian in BB Server hook scripts architecture.

We're looking into workaround for this problem right now, will reach you ASAP.

kovetskiy commented 4 years ago

@estebangit we've just released the fix for your issue. You can download it from official marketplace https://marketplace.atlassian.com/apps/1211631/external-hooks/version-history#b6312 or upgrade it through "Manage Apps" page in your Bitbucket installation.

You just need to click Asynchronous in Post Receive Hook settings tab that you can find on the screenshot.

2019-09-09-14T12T29

Let us know if you have any questions.

estebangit commented 4 years ago

@kovetski Thanks to release quickly a fix. The fix restore the asynchronous behaviour, but for some repositories, it calls the script correctly, but the while loop exit immediately. In synchronous mode it works as expected.

( while read from_ref to_ref ref_name; do ... done ) >>/log/my-script.log

kovetskiy commented 4 years ago

@estebangit I'm closing this one since you've created #98 which describes your issue.