Description of problem: If you create a Build without a BuildConfig in a Namespace, the build controller will emit the following logs into the controller-manager log stream: E1030 18:40:37.789888 1 build_controller.go:1166] failed to prune builds for ci-op-shiv3w0f/src: buildconfig.build.openshift.io "" not found E1030 18:40:43.447098 1 build_controller.go:1166] failed to prune builds for ci-op-p17vndip/operator-lifecycle-manager: buildconfig.build.openshift.io "" not found This is incorrectly assuming that the Build has a BuildConfig
Per discussion with Steve on slack, this isn't a high priority bug, but did interfere with debugging recent incidents on our CI cluster. Targeting 4.4 as this is an existing 3.11 issue that shouldn't block the 4.3 release.
PR https://github.com/openshift/openshift-controller-manager/pull/48 should handle this bug as well as 1767218
Testing for this would include - create a valid build object directly in a namespace vs. creating a build config and running oc start-build - see the build complete - repeat this 5 times - look at the logs for the 3 pods in the openshift-controller-manager namespace and make sure there are no build_controller logs with "failed to prune builds"
I can reproduce the issue in the following version, wait latest payload which is include the pr, will verified it. version: 4.3.0-0.nightly-2019-11-19-122017 [root@Desktop ~]# oc logs -f pod/controller-manager-w6drh -n openshift-controller-manager |grep -i "prune builds" E1121 07:26:36.211190 1 build_controller.go:1521] failed to prune builds for default/ruby-ex-7: builds.build.openshift.io "ruby-ex-1" not found
Verified in version: 4.3.0-0.nightly-2019-11-21-122827 Steps: 1. Create a build with buildconfig in my project $oc create -f build.yaml ----------build.yaml--------------- apiVersion: v1 kind: Build metadata: labels: name: build-without-bc-1 spec: resources: {} source: git: uri: git://github.com/openshift/ruby-hello-world type: Git strategy: sourceStrategy: from: kind: ImageStreamTag name: ruby:2.5 namespace: openshift type: Source ------------------------------------- 2. Create 6 builds $oc start-build --from-build=build-without-bc-1 build-without-bc-1 Source Git@7e2b285 Complete 5 minutes ago 59s build-without-bc-1-7514139911 Source Git@7e2b285 Complete 4 minutes ago 1m18s build-without-bc-1-2939714793 Source Git@7e2b285 Complete 4 minutes ago 1m4s build-without-bc-1-6971280066 Source Git@7e2b285 Complete 4 minutes ago 1m7s build-without-bc-1-8970521568 Source Git@7e2b285 Complete 4 minutes ago 1m16s build-without-bc-1-0382288048 Source Git@7e2b285 Complete 3 minutes ago 54s 3. Check the the 3 pods log in openshift-controller-manager, no info about "failed to prune builds"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0062