You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2017-11-10 10:43:42,271 INFO [threadpool:thread-2] brian @1EE93X5x643x7473x0 1eoaj33 10.XX.XX.XX "POST /scm/test/test.git/git-receive-pack HTTP/1.1" c.a.s.i.h.r.DefaultRepositoryHookService [TEST/test[703]] hook 'filesize-hook' vetoed the push request
2017-11-10 10:43:42,273 WARN [threadpool:thread-2] c.a.s.i.hook.DefaultHookService Hook socket I/O failed before the repository/hook could be identified
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
at com.atlassian.stash.internal.hook.DefaultBuiltInHookHandlerFactory.lambda$preReceive$0(DefaultBuiltInHookHandlerFactory.java:36)
at com.atlassian.stash.internal.hook.DefaultHookService.doHandleRequest(DefaultHookService.java:303)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRequest(DefaultHookService.java:289)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRawRequest(DefaultHookService.java:230)
at com.atlassian.stash.internal.hook.DefaultHookService$1.lambda$run$0(DefaultHookService.java:197)
at com.atlassian.stash.internal.concurrent.DefaultTransferableStateManager$StateTransferringRunnable.run(DefaultTransferableStateManager.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
... 11 frames trimmed
I disable the file hook, I push and it works.
I reactivate the plugin, I do a new commit and it works again.
Bitbucket 5.x does not like excluding null SHA1 commit which is used on
ADD ref changes. This was previously reported as christiangalsterer#33, but got lost in
refactoring.
Hello,
I have updated Bitbucket to version 5.4.1 and updated File Hook to version 3.0.0.
I create a new repository and I activate the File Size Hook with regex
Include: .*
Size: 4096
I do a touch test for an empty file
git clone
git add --all
git commit -m "asd"
git push origin
the push fails and the bitbucket log shows:
I disable the file hook, I push and it works.
I reactivate the plugin, I do a new commit and it works again.
I saw someone had the same issue:
https://community.atlassian.com/t5/Product-Apps-discussions/Unable-to-push-branch-created-locally-when-File-Hooks-plugin-is/td-p/612681
and he modified the code to:
if (refChange.getFromHash().equals("0000000000000000000000000000000000000000")) { request = new CommitsBetweenRequest.Builder(repository) .include(refChange.getToHash()) .build(); } else { request = new CommitsBetweenRequest.Builder(repositoryHookRequest.getRepository()) .exclude(refChange.getFromHash()) .include(refChange.getToHash()) .build(); }
Regards
The text was updated successfully, but these errors were encountered: