This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch release-1.3.x in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 94f604b0e85c69d22496e4e30cc83d93aa5eac4e Author: nicolaferraro <ni.ferr...@gmail.com> AuthorDate: Fri Jan 29 17:00:42 2021 +0100 Fix #1939: workaround for catalogs with duplicate entries --- pkg/util/camel/camel_runtime_catalog.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/util/camel/camel_runtime_catalog.go b/pkg/util/camel/camel_runtime_catalog.go index 2482eff..dc71a40 100644 --- a/pkg/util/camel/camel_runtime_catalog.go +++ b/pkg/util/camel/camel_runtime_catalog.go @@ -36,6 +36,15 @@ func NewRuntimeCatalog(spec v1.CamelCatalogSpec) *RuntimeCatalog { for id, artifact := range catalog.Artifacts { for _, scheme := range artifact.Schemes { scheme := scheme + + // In case of duplicate only, choose the "org.apache.camel.quarkus" artifact (if present). + // Workaround for https://github.com/apache/camel-k-runtime/issues/592 + if _, duplicate := catalog.artifactByScheme[scheme.ID]; duplicate { + if artifact.GroupID != "org.apache.camel.quarkus" { + continue + } + } + catalog.artifactByScheme[scheme.ID] = id catalog.schemesByID[scheme.ID] = scheme }