after knative 0.2.0 upgrade we're intermittently seeing duplicate build pods #2561
Labels
area/build
kind/bug
Issue is a bug
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
FWIW think this is different from issue #2515 which is caused by multiple knative build controllers running in a cluster.
This 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.
This 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.
I 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
So I'm wondering if the
build
resource is getting updated (possible by prow) in quick succession which triggers thereconcile
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?As a side note: it would be really good to get a test case to replicate what we're seeing with duplicate builds
The text was updated successfully, but these errors were encountered: