Skip to content

Commit

Permalink
Merge pull request #570 from MUzairS15/MUzairS15/chore/21
Browse files Browse the repository at this point in the history
Remove debugs logs.
  • Loading branch information
Mohd Uzair authored Aug 20, 2024
2 parents 223e2ed + 2dea939 commit 0f12bc4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
11 changes: 8 additions & 3 deletions models/meshmodel/core/v1beta1/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion models/meshmodel/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions models/meshmodel/registry/v1beta1/component_filter.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 0 additions & 2 deletions utils/kubernetes/apply-manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package kubernetes

import (
"context"
"fmt"
"strings"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0f12bc4

Please sign in to comment.