Comments (6)
I am encountering the same issue as well with that same exception stack.
Here's a repository that consistently fails when attempting to push with the filesize hook
https://github.com/antitypical/Result
Fixes or workarounds would be appreciated.
from stash-filehooks-plugin.
From what I can see in the code, it seems that when trying to get the map of the objects sizes, some of them have a null value. Cannot dig any further into this because this happens inside BitBucket which isn't OpenSource, unfortunately :-(
We can avoid at least to crash the entire hook execution by just filtering out the incorrect null values.
Going to propose a PR on this shortly.
Luca
from stash-filehooks-plugin.
Thanks for providing the PR. It is already merged and I will cut a new release in the next days.
from stash-filehooks-plugin.
A new release 3.2.2 ia now available in the Atlassian Marketplace.
from stash-filehooks-plugin.
Hi! We are still seeing this error after upgrading plugin to v3.3.2 and Bitbucket Server to v5.9.1. The developer of the project who has the repo experiencing the error say that it is only when committing the reference of a linked sub-module the error occurs, so might be a fringe use case. Just letting you know.
The exception is:
2018-05-16 15:00:30,254 DEBUG [hook-callback:thread-2] user @1O0M7BMx900x21082309x2 12k1w1h 139.115.246.152 SSH - git-receive-pack '/project/repo.git' c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file --batch-check
2018-05-16 15:00:30,255 WARN [hook-callback:thread-2] user @1O0M7BMx900x21082309x2 12k1w1h 139.115.246.152 SSH - git-receive-pack '/project/repo.git' c.a.s.i.h.r.DefaultRepositoryHookService [project/repo[600]] Error calling com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.preUpdate (org.christiangalsterer.stash-filehooks-plugin:filesize-hook)
java.lang.NullPointerException: null
at java.util.HashMap.merge(HashMap.java:1225)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1553)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.christiangalsterer.stash.filehooks.plugin.hook.CachingResolver.batchResolve(CachingResolver.java:87)
at org.christiangalsterer.stash.filehooks.plugin.hook.FileSizeHook.onReceive(FileSizeHook.java:82)
at com.atlassian.stash.internal.plugin.legacy.PreReceiveRepositoryHookAdapter.preUpdate(PreReceiveRepositoryHookAdapter.java:29)
at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.lambda$preUpdate$2(CompositeRepositoryHook.java:76)
at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.handlingExceptions(CompositeRepositoryHook.java:92)
at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.preUpdate(CompositeRepositoryHook.java:75)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.preUpdate(DefaultRepositoryHookService.java:860)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.lambda$preUpdate$4(DefaultRepositoryHookService.java:458)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.preUpdate(DefaultRepositoryHookService.java:437)
at com.atlassian.stash.internal.hook.DefaultBuiltInHookHandlerFactory.lambda$preReceive$0(DefaultBuiltInHookHandlerFactory.java:36)
at com.atlassian.stash.internal.scm.git.GitQuarantineHelper.lambda$null$0(GitQuarantineHelper.java:89)
at com.atlassian.stash.internal.hook.DefaultHookService.doHandleRequest(DefaultHookService.java:299)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRequest(DefaultHookService.java:285)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRawRequest(DefaultHookService.java:219)
at com.atlassian.stash.internal.hook.DefaultHookService$1.lambda$run$0(DefaultHookService.java:186)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
... 26 frames trimmed
2018-05-16 15:00:30,255 INFO [hook-callback:thread-2] user @1O0M7BMx900x21082309x2 12k1w1h 139.115.246.152 SSH - git-receive-pack '/project/repo.git' c.a.s.i.h.r.DefaultRepositoryHookService [project/repo[600]] hook 'filesize-hook' vetoed the push request
from stash-filehooks-plugin.
NPE on submodule will be fixed via #54
from stash-filehooks-plugin.
Related Issues (20)
- instructions for compiling latest version HOT 1
- When multiple size rules use the same size, only last rule is effective HOT 2
- File Name Hook is not listed in the "Pre receive" hooks HOT 4
- File Hook fails when repository is new - blocker HOT 1
- Cannot see File Name Hook under Pre Receive hooks anymore HOT 1
- File hook should be available at Project level HOT 4
- Improve UI for project level configuration HOT 1
- Upgrade to newer Bitbucket API and remove deprecated classes HOT 3
- [Feature Request] Allow hook to also limit the number of files committed in any particular commit
- Unable to push after upgrade to 3.3.0 version HOT 2
- File Size detection seems not always to be working HOT 8
- File Name Hook missing in configuration of repo HOT 1
- merge check doesn't honor the branch regex
- Toggling File Size Hook at repository level doesn't generate an audit log entry
- File name hook incorrectly prevents a merge whereby the source branch is from a private fork repository HOT 1
- Filtering per file extension
- Incompatible with Bitbucket Data Center HOT 5
- TextBox to add custom message
- Cannot be enabled in Bitbucket 6.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stash-filehooks-plugin.