Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix deprecated meshkit packages #167

Closed
wants to merge 7 commits into from
Prev Previous commit
Next Next commit
fix: update import paths for meshmodel and component definitions to u…
…se v1beta1

Signed-off-by: devhindo <[email protected]>
devhindo committed Jan 3, 2025
commit c37c3683fbf5093a45471c0f8185c825b51f5a8e
1 change: 1 addition & 0 deletions adapter/meshmodel.go
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
backoff "github.com/cenkalti/backoff/v4"
"github.com/layer5io/meshkit/models/meshmodel/entity"
"github.com/meshery/schemas/models/v1beta1/component"
"github.com/layer5io/meshkit/models/meshmodel/core/v1beta1"

Check failure on line 14 in adapter/meshmodel.go

GitHub Actions / golangci-lint

"github.com/layer5io/meshkit/models/meshmodel/core/v1beta1" imported and not used

Check failure on line 14 in adapter/meshmodel.go

GitHub Actions / golangci-lint

"github.com/layer5io/meshkit/models/meshmodel/core/v1beta1" imported and not used

"github.com/layer5io/meshkit/models/meshmodel/registry"
)
@@ -20,7 +21,7 @@
// EntityDefinitionPath holds the path for Entity Definition file
EntityDefintionPath string

Type types.CapabilityType

Check failure on line 24 in adapter/meshmodel.go

GitHub Actions / golangci-lint

undefined: types

Check failure on line 24 in adapter/meshmodel.go

GitHub Actions / golangci-lint

undefined: types
// Host is the address of the gRPC host capable of processing the request
Host string
Port int
@@ -56,7 +57,7 @@
if err != nil {
return ErrOpenOAMDefintionFile(err)
}
mrd.Host = registry.Host{

Check failure on line 60 in adapter/meshmodel.go

GitHub Actions / golangci-lint

mrd.Host undefined (type "github.com/layer5io/meshkit/models/meshmodel/registry".MeshModelRegistrantData has no field or method Host)

Check failure on line 60 in adapter/meshmodel.go

GitHub Actions / golangci-lint

undefined: registry.Host
Hostname: dpath.Host,
Port: dpath.Port,
Metadata: ctxID,
3 changes: 2 additions & 1 deletion adapter/oam.go
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
"github.com/layer5io/meshkit/models/oam/core/v1alpha1"
"github.com/layer5io/meshkit/utils"
"github.com/layer5io/meshkit/utils/manifests"
"github.com/meshery/schemas/models/v1beta1/component"
)

var (
@@ -91,7 +92,7 @@
if err != nil {
return nil, err
}
var c meshmodel.ComponentDefinition

Check failure on line 95 in adapter/oam.go

GitHub Actions / golangci-lint

undefined: meshmodel.ComponentDefinition
c.Metadata = make(map[string]interface{})
metaname := strings.Split(manifests.FormatToReadableString(oamdef.ObjectMeta.Name), ".")
var displayname string
@@ -99,7 +100,7 @@
displayname = metaname[0]
}
c.DisplayName = displayname
c.Model.Category = meshmodel.Category{

Check failure on line 103 in adapter/oam.go

GitHub Actions / golangci-lint

undefined: meshmodel.Category
Name: mcfg.Category,
}
if mcfg.CategoryMetadata != nil {
@@ -120,7 +121,7 @@
c.Model.DisplayName = manifests.FormatToReadableString(c.Model.Name)
c.Model.Name = strings.ToLower(c.Model.Name)
c.Model.Metadata = c.Metadata
c.Format = meshmodel.JSON

Check failure on line 124 in adapter/oam.go

GitHub Actions / golangci-lint

undefined: meshmodel.JSON (typecheck)
c.Schema = schema
byt, err := json.Marshal(c)
if err != nil {
@@ -181,7 +182,7 @@
return nil
}
func modifyMeshmodelVersionInDefinition(old []byte, newversion string) (new []byte, err error) {
var def meshmodel.ComponentDefinition
var def component.ComponentDefinition
err = json.Unmarshal(old, &def)
if err != nil {
return

Unchanged files with check annotations Beta

"time"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery"
"github.com/layer5io/meshery-adapter-library/adapter"

Check failure on line 29 in api/grpc/grpc.go

GitHub Actions / golangci-lint

could not import github.com/layer5io/meshery-adapter-library/adapter (-: # github.com/layer5io/meshery-adapter-library/adapter
"github.com/layer5io/meshery-adapter-library/meshes"
"github.com/layer5io/meshkit/utils/events"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"