Description of problem: If BitBucket webhook is used to triggeer build and git-commit contains git tag, OpenShift master-api-service crashes and coredump is created. Version-Release number of selected component (if applicable): oc version oc v3.9.30 kubernetes v1.9.1+a0ce1bc657 features: Basic-Auth GSSAPI Kerberos SPNEGO How reproducible: Every time Steps to Reproduce: 1. Create Bitbucket webhook to trigger a build using: Triggers: repo:push 2. Push some code to repository with tag to trigger the build 3. OpenShift master-api-service crashes Actual results: Openshift-master-api-service crashes and generates core-dump Expected results: Build starts normally Additional info: https://github.com/openshift/origin/blob/e004e6513ec755a7a106dc97516703847e470d0b/pkg/build/webhook/bitbucket/bitbucket.go#L159 On line 159 the parser expects lastCommits to be present on the JSON-payload. But when push is tagged with some git-tag parser fails to read the commit information.
Created attachment 1508809 [details] Failing BitBucket webhook payload
Created attachment 1508810 [details] Succesful BitBucket webhook payload
Created attachment 1508811 [details] openshift-logs
Seems to fixed on upstream 3.10: https://github.com/openshift/origin/blob/release-3.10/pkg/build/webhook/bitbucket/bitbucket.go if len(event.Push.Changes) == 0 || len(event.Push.Changes[0].Commits) == 0 So should this be backported to 3.9? Where: if len(event.Push.Changes) == 0 And webhook payload includes changes but no commits (just tags).
We would only backport it if there is a specific customer request and that customer cannot reasonably upgrade to 3.10. Closing as won't fix for now, pending that request/requirement.