diff --git a/models/meshmodel/core/v1beta1/host.go b/models/meshmodel/core/v1beta1/host.go index 0d2cdee2..fe7d1c61 100644 --- a/models/meshmodel/core/v1beta1/host.go +++ b/models/meshmodel/core/v1beta1/host.go @@ -62,8 +62,8 @@ type ArtifactHub struct{} const MesheryAnnotationPrefix = "design.meshery.io" func (ah ArtifactHub) HandleDependents(comp component.ComponentDefinition, kc *kubernetes.Client, isDeploy, performUpgrade bool) (summary string, err error) { - sourceURI, err := utils.Cast[string](comp.Metadata.AdditionalProperties["source_uri"]) // should be part of registrant data(?) - if err != nil { + sourceURI, ok := comp.Model.Metadata.AdditionalProperties["source_uri"] // should be part of registrant data(?) + if !ok { return summary, err } @@ -72,9 +72,14 @@ func (ah ArtifactHub) HandleDependents(comp component.ComponentDefinition, kc *k act = kubernetes.INSTALL } + _sourceURI, err := utils.Cast[string](sourceURI) + if err != nil { + return summary, err + } + if sourceURI != "" { err = kc.ApplyHelmChart(kubernetes.ApplyHelmChartConfig{ - URL: sourceURI, + URL: _sourceURI, Namespace: comp.Configuration["namespace"].(string), CreateNamespace: true, Action: act, diff --git a/models/meshmodel/registry/registry.go b/models/meshmodel/registry/registry.go index cc9d1c1b..ad1b03cc 100644 --- a/models/meshmodel/registry/registry.go +++ b/models/meshmodel/registry/registry.go @@ -177,7 +177,6 @@ func (rm *RegistryManager) GetRegistrants(f *models.HostFilter) ([]models.MeshMo var response []models.MeshModelHostsWithEntitySummary - fmt.Println("result--------------------------", result) for _, r := range result { res := models.MeshModelHostsWithEntitySummary{ Connection: r.Connection, diff --git a/models/meshmodel/registry/v1beta1/component_filter.go b/models/meshmodel/registry/v1beta1/component_filter.go index 3265abfc..76a6fb57 100644 --- a/models/meshmodel/registry/v1beta1/component_filter.go +++ b/models/meshmodel/registry/v1beta1/component_filter.go @@ -1,8 +1,6 @@ package v1beta1 import ( - "fmt" - "github.com/layer5io/meshkit/database" "github.com/layer5io/meshkit/models/meshmodel/entity" "github.com/layer5io/meshkit/models/meshmodel/registry" @@ -139,7 +137,6 @@ func (componentFilter *ComponentFilter) Get(db *database.Handler) ([]entity.Enti err := finder. Scan(&componentDefinitionsWithModel).Error if err != nil { - fmt.Println("line 123 : =+++++++++++++++", err) return nil, 0, 0, err } diff --git a/utils/kubernetes/apply-manifest.go b/utils/kubernetes/apply-manifest.go index 91a4e8f9..f1d1beac 100644 --- a/utils/kubernetes/apply-manifest.go +++ b/utils/kubernetes/apply-manifest.go @@ -2,7 +2,6 @@ package kubernetes import ( "context" - "fmt" "strings" v1 "k8s.io/api/core/v1" @@ -95,7 +94,6 @@ func (client *Client) ApplyManifest(contents []byte, recvOptions ApplyOptions) e return err } } else { - fmt.Println("Creating object", object) _, err = createObject(helper, options.Namespace, object, options.Update) if err != nil && !kubeerror.IsAlreadyExists(err) { if recvOptions.IgnoreErrors {