{"action":"opened","issue":{"url":"https://api.github.com/repos/jenkins-x/jx/issues/2561","repository_url":"https://api.github.com/repos/jenkins-x/jx","labels_url":"https://api.github.com/repos/jenkins-x/jx/issues/2561/labels{/name}","comments_url":"https://api.github.com/repos/jenkins-x/jx/issues/2561/comments","events_url":"https://api.github.com/repos/jenkins-x/jx/issues/2561/events","html_url":"https://github.com/jenkins-x/jx/issues/2561","id":393279140,"node_id":"MDU6SXNzdWUzOTMyNzkxNDA=","number":2561,"title":"after knative 0.2.0 upgrade we're intermittently seeing duplicate build pods","user":{"login":"rawlingsj","id":1457180,"node_id":"MDQ6VXNlcjE0NTcxODA=","avatar_url":"https://avatars2.githubusercontent.com/u/1457180?v=4","gravatar_id":"","url":"https://api.github.com/users/rawlingsj","html_url":"https://github.com/rawlingsj","followers_url":"https://api.github.com/users/rawlingsj/followers","following_url":"https://api.github.com/users/rawlingsj/following{/other_user}","gists_url":"https://api.github.com/users/rawlingsj/gists{/gist_id}","starred_url":"https://api.github.com/users/rawlingsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawlingsj/subscriptions","organizations_url":"https://api.github.com/users/rawlingsj/orgs","repos_url":"https://api.github.com/users/rawlingsj/repos","events_url":"https://api.github.com/users/rawlingsj/events{/privacy}","received_events_url":"https://api.github.com/users/rawlingsj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-21T01:42:18Z","updated_at":"2018-12-21T01:42:18Z","closed_at":null,"author_association":"MEMBER","body":"FWIW  think this is different from issue https://github.com/jenkins-x/jx/issues/2515 which is caused by multiple knative build controllers running in a cluster.\r\n\r\nThis issue has only started since the 0.2.0 knative build upgrade.  Prow is creating a single build resources and the knative build controller is starting two build pods with the exact same details, i.e __org__ __repo__ __ref__ __buildid__ etc.\r\n\r\nThis doesn't happen on every build which suggests it could be a timing issue maybe.  This is me just speculating right now but it could be an issue with the upstream knative build project.  Let's gather facts and understand the issue so we can engage in a positive manner.\r\n\r\nI just had a quick look and it seems this is getting called twice https://github.com/knative/build/blob/a0c7c07/pkg/reconciler/build/build.go#L173\r\nSo I'm wondering if the `build` resource is getting updated (possible by prow) in quick succession which triggers the `reconcile` function twice, so perhaps this logic https://github.com/knative/build/blob/a0c7c07/pkg/reconciler/build/build.go#L159 to check if a build pod is started is correct?  Could the cluster or pod name not be updated by the first watch event by the time another is received?  \r\n\r\nAs a side note: it would be really good to get a test case to replicate what we're seeing with duplicate builds\r\n\r\n"}}
{"actor":{"display_login":"rawlingsj"}}