Closed rappazzo closed 10 years ago
Ok, I think hook should always return false
if output limits are exceeded.
But clipping output should not be an option, because of if output exceeds 65K, then Stash silently aborts a push with non-descriptive error like "communication error".
Please, bump "release" component of version in pom.xml
so I can merge a PR and deploy hook on marketplace.
Done.
So, now a side effect of this change is that when you have a pre-receive hook that is normally non-rejecting, but produces excessive output, it will reject.
If you prefer, I can modify my other change to always truncate/clip the output, and then have an option to discard further output or reject the push. Let me know which you think is best.
Thanks for the contribution! I've uploaded new version to the marketplace.
Regarding your comment about side-effect: situation in which hook produces over 65K over information is abnormal and should be avoided. So, I think it's good to forbid push unconditionally.
Thanks. I appreciate that you are responsive and that we can easily collaborate on this. On May 13, 2014 7:41 AM, "Stanislav Seletskiy" notifications@github.com wrote:
Regarding your comment about side-effect: situation in which hook produces over 65K over information is abnormal and should be avoided. So, I think it's good to forbid push unconditionally.
— Reply to this email directly or view it on GitHubhttps://github.com/ngsru/atlassian-external-hooks/pull/8#issuecomment-42944553 .
As I stated in my comment to the parent changeset, I believe that returning true when the output exceeds 65K is a bug (and it could lead to change sets which violate what the hooks are designed to keep out).
If you think that I am wrong about this, I have also coded a change that would allow the hook setup to specify what occurs when there is excessive output. In that case, please reject this pull request, and indicate that I should make a pull request for that change set.