This is an automated email from the ASF dual-hosted git repository. gfournier pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push: new 2d942f4f3 fix(api): count all sources only once 2d942f4f3 is described below commit 2d942f4f307c2b4861605f03e854e7acf9754ec8 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Thu Mar 13 18:11:55 2025 +0100 fix(api): count all sources only once Closes #6098 --- pkg/apis/camel/v1/integration_types_support.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/apis/camel/v1/integration_types_support.go b/pkg/apis/camel/v1/integration_types_support.go index 82acb67da..9d46323a9 100644 --- a/pkg/apis/camel/v1/integration_types_support.go +++ b/pkg/apis/camel/v1/integration_types_support.go @@ -90,11 +90,16 @@ func (in *Integration) AllSources() []SourceSpec { if len(in.Status.GeneratedSources) == 0 { sources = append(sources, src) } else { + found := false for _, genSrc := range in.Status.GeneratedSources { - if src.Name != genSrc.Name { - sources = append(sources, src) + if src.Name == genSrc.Name { + found = true + break } } + if !found { + sources = append(sources, src) + } } }