1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #7439 resolved

Git post commit hook payloads has empty commits field for large commits (BB-8636)

pranavkm
created an issue

We use the post commit hook to read details of the last commit made. However, for commits with large number of files, the payload we receive has an empty "commits" list

Here's the repro:

  1. Clone the repository at https://bitbucket.org/kudutest/bitbucketlargepayload. It has a single commit that includes about 5000 files.
  2. Create a new Git repository on Bitbucket
  3. In this new repo, set up a POST hook from the services tab to point to a receiver (I used http://requestb.in/)
  4. Push the cloned repository to the new repo

Expected: The payload contains specifics about the commit

Actual: The commits field is empty. Here's what the payload looks like:

{ "canon_url": "https://bitbucket.org", "commits": [], "repository": { "absolute_url": "/kudutest/bitbucketlargepayload/", "fork": false, "is_private": false, "name": "BitbucketLargePayload", "owner": "kudutest", "scm": "git", "slug": "bitbucketlargepayload", "website": "" }, "truncated": true, "user": "kudutest" }

Consequent commits with fewer files correctly populate the "commits" field. I'm not sure if this is a recent change in behavior or if it has always been the case.

Comments (14)

  1. Brian Nguyen

    Hi,

    Thanks for raising this issue. It appears that when pushing up large commits, the processing takes too long and we stop the calculation of the payload. This results in the empty field.

    I have added this issue to our backlog, please watch this for further updates.

    Cheers, Brian

  2. pranavkm reporter

    Thought I might update this - it looks like the payload has been fixed to include the set of commits. However for some reason the "branch" field for these commits seem to be set to null. I'm not seeing this with smaller repositories

  3. Dan Sosedoff

    Not fixed yet. I've been getting empty commit payloads for a fairly small pushes (~10-20 commits), and sometimes on a 2-4 commits pushes. Issue occurs mostly on branch merges, which is kind of annoying since CI cannot be triggered.

  4. Nick Larson

    Having the same problem as well. This is big for us, and may end up moving to another provider because of it.

    This seems to happen on clean merges, when there was no merge commit added.

  5. Sean Farley staff

    I realize this has sat in our queue (and that totally sucks) but the correct way to do this is through webhooks now. If this still exists in webhooks, then please report back.

  6. Log in to comment