ashwanthkumar / gocd-build-github-pull-requests

GoCD plugin to build PRs for a Github repo
95 stars 72 forks source link

Error while scheduling pipeline #143

Closed gregoryfischer closed 4 years ago

gregoryfischer commented 4 years ago

I did not see a comparable issue on this, and I have been trying to debug on my own for half a day, so hoping to get some insight on what might be the problem.

GoCD server and agents running in docker containers. Everything works great but am having issues with triggering pipelines when new enterprise git PRs are created. I followed the setup instructions in this repo and the error below seems to indicate the communication between our company enterprise git is detecting new PRs, but the scheduling is failing.

I did have to add ~/.github configuration in the good-server docker container and connection test returned green so that does not appear to be the problem.

Environment: gocd/gocd-server:v19.12.0 gocd/gocd-agent-ubuntu-18.04:v19.12.0 github-pr-poller-1.3.5.jar github-pr-status-1.6-73.jar

Thanks in advance for any help.

gocd-server_1  | jvm 1    | 2020-03-27 23:20:12,773 ERROR [115@MessageListener for ScheduleCheckListener] BuildCauseProducerService:220 - Error while scheduling pipeline: my-repo-pr-test
gocd-server_1  | jvm 1    | java.lang.NullPointerException: null
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.domain.MaterialRevisions.internalHasChangedSince(MaterialRevisions.java:166)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.domain.MaterialRevisions.hasChangedSince(MaterialRevisions.java:175)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.scheduling.BuildCauseProducerService.newProduceBuildCause(BuildCauseProducerService.java:186)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.scheduling.BuildCauseProducerService.newProduceBuildCause(BuildCauseProducerService.java:148)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.scheduling.BuildCauseProducerService.autoSchedulePipeline(BuildCauseProducerService.java:110)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.scheduling.ScheduleCheckListener.onMessage(ScheduleCheckListener.java:44)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.scheduling.ScheduleCheckListener.onMessage(ScheduleCheckListener.java:24)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:84)
gocd-server_1  | jvm 1    |     at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:64)
gocd-server_1  | jvm 1    |     at java.base/java.lang.Thread.run(Unknown Source)
gregoryfischer commented 4 years ago

Turns out, the github-pr-status settings needed an /api/v3 tweak on the endpoint. File under good to know.