From cf1999edc20fe2f71425d76cf1c8f00ffd6387cc Mon Sep 17 00:00:00 2001 From: adarsh-jaiss Date: Thu, 29 Feb 2024 17:09:09 +0530 Subject: [PATCH] fixed Order of Local Source between Builds and BuildRuns --- pkg/reconciler/buildrun/resources/sources.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/reconciler/buildrun/resources/sources.go b/pkg/reconciler/buildrun/resources/sources.go index 415cbb593e..8aeeaf5b3c 100644 --- a/pkg/reconciler/buildrun/resources/sources.go +++ b/pkg/reconciler/buildrun/resources/sources.go @@ -29,16 +29,14 @@ func isLocalCopyBuildSource( buildRun *buildv1beta1.BuildRun, ) *buildv1beta1.Local { - // Note: In v1alpha1 we will append all sources across builds and buildruns, and then return - // the first source of type Local. - if build.Spec.Source.Type == buildv1beta1.LocalType { - return build.Spec.Source.LocalSource - } - if buildRun.Spec.Source != nil && buildRun.Spec.Source.Type == buildv1beta1.LocalType { return buildRun.Spec.Source.LocalSource } + if build.Spec.Source.Type == buildv1beta1.LocalType { + return build.Spec.Source.LocalSource + } + return nil }