From 76de79b9a014827fd5983d67372ffa6f7c76e073 Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Sun, 7 Jul 2024 23:39:02 +0530 Subject: [PATCH 1/5] feat: Model Export command Signed-off-by: Nithish Karthik --- mesheryctl/internal/cli/root/model/export.go | 61 +++++++++++++++++++ mesheryctl/internal/cli/root/model/model.go | 60 +++++++++++++++++- mesheryctl/internal/cli/root/model/search.go | 2 +- .../internal/cli/root/registry/generate.go | 6 +- .../internal/cli/root/registry/publish.go | 4 +- 5 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 mesheryctl/internal/cli/root/model/export.go diff --git a/mesheryctl/internal/cli/root/model/export.go b/mesheryctl/internal/cli/root/model/export.go new file mode 100644 index 00000000000..82c93c9d6f3 --- /dev/null +++ b/mesheryctl/internal/cli/root/model/export.go @@ -0,0 +1,61 @@ +package model + +import ( + "fmt" + "github.com/layer5io/meshery/mesheryctl/internal/cli/root/config" + "github.com/layer5io/meshery/mesheryctl/pkg/utils" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +// mesheryctl model export +var exportModal = &cobra.Command{ + Use: "export", + Short: "export registered models", + Long: "export the registered model to the specified output type", + Example: ` +// Export a model by name +mesheryctl model export -o json +mesheryctl model export -o yaml +mesheryctl model export --include-components true --include-relationships true + `, + PreRunE: func(cmd *cobra.Command, args []string) error { + //Check prerequisite + mctlCfg, err := config.GetMesheryCtl(viper.GetViper()) + if err != nil { + return err + } + err = utils.IsServerRunning(mctlCfg.GetBaseMesheryURL()) + if err != nil { + return err + } + ctx, err := mctlCfg.GetCurrentContext() + if err != nil { + return err + } + err = ctx.ValidateVersion() + if err != nil { + return err + } + return nil + }, + Args: func(_ *cobra.Command, args []string) error { + const errMsg = "Usage: mesheryctl model export [model-name]\nRun 'mesheryctl model export --help' to see detailed help message" + if len(args) == 0 { + return utils.ErrInvalidArgument(errors.New("Please provide a model name. " + errMsg)) + } + return nil + }, + RunE: func(cmd *cobra.Command, args []string) error { + mctlCfg, err := config.GetMesheryCtl(viper.GetViper()) + if err != nil { + log.Fatalln(err, "error processing config") + } + baseUrl := mctlCfg.GetBaseMesheryURL() + modelName := args[0] + url := fmt.Sprintf("%s/api/meshmodels/models/%s?components=%t&relationships=%t&%s", baseUrl, modelName, includeCompsFlag, includeRelsFlag ,utils.GetPageQueryParameter(cmd, pageNumberFlag)) + return exportModel(args[0], cmd, url, false) + }, +} \ No newline at end of file diff --git a/mesheryctl/internal/cli/root/model/model.go b/mesheryctl/internal/cli/root/model/model.go index 391827804e0..de7b1b277a2 100644 --- a/mesheryctl/internal/cli/root/model/model.go +++ b/mesheryctl/internal/cli/root/model/model.go @@ -20,6 +20,7 @@ import ( "io" "net/http" "os" + "path/filepath" "github.com/fatih/color" "github.com/layer5io/meshery/mesheryctl/internal/cli/root/config" @@ -39,13 +40,20 @@ var ( // flag used to specify format of output of view {model-name} command outFormatFlag string + // flag used to specify format of output of export {model-name} command + outTypeFlag string + // flag used to specify whether to include components in the model + includeCompsFlag bool + // flag used to specify whether to include relationships in the model + includeRelsFlag bool + // Maximum number of rows to be displayed in a page maxRowsPerPage = 25 // Color for the whiteboard printer whiteBoardPrinter = color.New(color.FgHiBlack, color.BgWhite, color.Bold) - availableSubcommands = []*cobra.Command{listModelCmd, viewModelCmd, searchModelCmd} + availableSubcommands = []*cobra.Command{listModelCmd, viewModelCmd, searchModelCmd, exportModal} countFlag bool ) @@ -133,6 +141,11 @@ mesheryctl model search [model-name] func init() { listModelCmd.Flags().IntVarP(&pageNumberFlag, "page", "p", 1, "(optional) List next set of models with --page (default = 1)") viewModelCmd.Flags().StringVarP(&outFormatFlag, "output-format", "o", "yaml", "(optional) format to display in [json|yaml]") + + exportModal.Flags().StringVarP(&outTypeFlag, "output-type", "o", "yaml", "(optional) format to display in [json|yaml] (default = yaml)") + exportModal.Flags().BoolVarP(&includeCompsFlag, "include-components", "c", false, "whether to include components in the model definition (default = false)") + exportModal.Flags().BoolVarP(&includeRelsFlag, "include-relationships", "r", false, "whether to include components in the model definition (default = false)") + ModelCmd.AddCommand(availableSubcommands...) ModelCmd.Flags().BoolVarP(&countFlag, "count", "", false, "(optional) Get the number of models in total") } @@ -255,3 +268,48 @@ func listModel(cmd *cobra.Command, url string, displayCountOnly bool) error { return nil } + +func exportModel(modelName string, cmd *cobra.Command, url string, displayCountOnly bool) error { + // Find the entity with the model name + req, err := utils.NewRequest(http.MethodGet, url, nil) + if err != nil { + utils.Log.Error(err) + return err + } + + resp, err := utils.MakeRequest(req) + if err != nil { + utils.Log.Error(fmt.Errorf("Could not reach meshery server: %s", err)) + return err + } + + // ensure proper cleaning of resources + defer resp.Body.Close() + + data, err := io.ReadAll(resp.Body) + if err != nil { + utils.Log.Error(fmt.Errorf("Invalid response from meshery server: %s", err)) + return err + } + + modelsResponse := &models.MeshmodelsAPIResponse{} + err = json.Unmarshal(data, modelsResponse) + if err != nil { + utils.Log.Error(fmt.Errorf("Invalid response from meshery server: %s", err)) + return err + } + model := modelsResponse.Models[0] + // Convert it to the required output type and write it + if(outTypeFlag == "yaml"){ + err = model.WriteModelDefinition(filepath.Join("./", modelName), "yaml") + } + if(outTypeFlag == "json"){ + err = model.WriteModelDefinition(filepath.Join("./", modelName), "json") + } + if err != nil { + utils.Log.Error(fmt.Errorf("Could not write model file: %s", err)) + utils.Log.Error(err) + return err + } + return nil +} \ No newline at end of file diff --git a/mesheryctl/internal/cli/root/model/search.go b/mesheryctl/internal/cli/root/model/search.go index 8f8da17b365..bbd1e52fa6d 100644 --- a/mesheryctl/internal/cli/root/model/search.go +++ b/mesheryctl/internal/cli/root/model/search.go @@ -108,4 +108,4 @@ mesheryctl model search [query-text] return nil }, -} +} \ No newline at end of file diff --git a/mesheryctl/internal/cli/root/registry/generate.go b/mesheryctl/internal/cli/root/registry/generate.go index 1b422122030..b0bce0f2f30 100644 --- a/mesheryctl/internal/cli/root/registry/generate.go +++ b/mesheryctl/internal/cli/root/registry/generate.go @@ -64,7 +64,7 @@ var generateCmd = &cobra.Command{ Short: "Generate Models", Long: "Prerequisite: Excecute this command from the root of a meshery/meshery repo fork.\n\nGiven a Google Sheet with a list of model names and source locations, generate models and components any Registrant (e.g. GitHub, Artifact Hub) repositories.\n\nGenerated Model files are written to local filesystem under `/server/models/`.", Example: ` -// Generate Meshery Models from a Google Spreadsheet (i.e. "Meshery Integrations" spreadsheet). +// Generate Meshery Models from a Google Spreadsheet (i.e. "Meshery Integrations" spreadsheet). mesheryctl registry generate --spreadsheet-id "1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw" --spreadsheet-cred // Directly generate models from one of the supported registrants by using Registrant Connection Definition and (optional) Registrant Credential Definition mesheryctl registry generate --registrant-def [path to connection definition] --registrant-cred [path to credential definition] @@ -408,7 +408,7 @@ func createVersionedDirectoryForModelAndComp(version, modelName string) (string, func writeModelDefToFileSystem(model *utils.ModelCSV, version, modelDefPath string) (*v1beta1.Model, error) { modelDef := model.CreateModelDefinition(version, defVersion) - err := modelDef.WriteModelDefinition(modelDefPath) + err := modelDef.WriteModelDefinition(modelDefPath+"/model.json", "json") if err != nil { return nil, err } @@ -441,4 +441,4 @@ func init() { generateCmd.MarkFlagsMutuallyExclusive("spreadsheet-cred", "registrant-cred") generateCmd.PersistentFlags().StringVarP(&outputLocation, "output", "o", "../server/meshmodel", "location to output generated models, defaults to ../server/meshmodels") -} +} \ No newline at end of file diff --git a/mesheryctl/internal/cli/root/registry/publish.go b/mesheryctl/internal/cli/root/registry/publish.go index 5e7091f5ecb..72c7b9ebb60 100644 --- a/mesheryctl/internal/cli/root/registry/publish.go +++ b/mesheryctl/internal/cli/root/registry/publish.go @@ -272,10 +272,10 @@ func init() { func WriteModelDefToFileSystem(model *utils.ModelCSV, version string, location string) (string, *v1beta1.Model, error) { modelDef := model.CreateModelDefinition(version, defVersion) modelDefPath := filepath.Join(location, modelDef.Name) - err := modelDef.WriteModelDefinition(modelDefPath) + err := modelDef.WriteModelDefinition(modelDefPath+"/model.json", "json") if err != nil { return "", nil, err } return modelDefPath, &modelDef, nil -} +} \ No newline at end of file From 680687decd2e53f4b5f571d616fd6bb1d2a543c8 Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Mon, 8 Jul 2024 19:50:40 +0530 Subject: [PATCH 2/5] refactor: Add support for defining output location Signed-off-by: Nithish Karthik --- mesheryctl/internal/cli/root/model/export.go | 15 ++++++++------- mesheryctl/internal/cli/root/model/model.go | 20 +++++++++++--------- mesheryctl/internal/cli/root/model/search.go | 2 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/mesheryctl/internal/cli/root/model/export.go b/mesheryctl/internal/cli/root/model/export.go index 82c93c9d6f3..4b16da0acc3 100644 --- a/mesheryctl/internal/cli/root/model/export.go +++ b/mesheryctl/internal/cli/root/model/export.go @@ -19,6 +19,7 @@ var exportModal = &cobra.Command{ // Export a model by name mesheryctl model export -o json mesheryctl model export -o yaml +mesheryctl model export -l /home/meshery/ mesheryctl model export --include-components true --include-relationships true `, PreRunE: func(cmd *cobra.Command, args []string) error { @@ -42,11 +43,11 @@ mesheryctl model export --include-components true --include-relation return nil }, Args: func(_ *cobra.Command, args []string) error { - const errMsg = "Usage: mesheryctl model export [model-name]\nRun 'mesheryctl model export --help' to see detailed help message" - if len(args) == 0 { - return utils.ErrInvalidArgument(errors.New("Please provide a model name. " + errMsg)) - } - return nil + const errMsg = "Usage: mesheryctl model export [model-name]\nRun 'mesheryctl model export --help' to see detailed help message" + if len(args) == 0 { + return utils.ErrInvalidArgument(errors.New("Please provide a model name. " + errMsg)) + } + return nil }, RunE: func(cmd *cobra.Command, args []string) error { mctlCfg, err := config.GetMesheryCtl(viper.GetViper()) @@ -55,7 +56,7 @@ mesheryctl model export --include-components true --include-relation } baseUrl := mctlCfg.GetBaseMesheryURL() modelName := args[0] - url := fmt.Sprintf("%s/api/meshmodels/models/%s?components=%t&relationships=%t&%s", baseUrl, modelName, includeCompsFlag, includeRelsFlag ,utils.GetPageQueryParameter(cmd, pageNumberFlag)) + url := fmt.Sprintf("%s/api/meshmodels/models/%s?components=%t&relationships=%t&%s", baseUrl, modelName, includeCompsFlag, includeRelsFlag, utils.GetPageQueryParameter(cmd, pageNumberFlag)) return exportModel(args[0], cmd, url, false) }, -} \ No newline at end of file +} diff --git a/mesheryctl/internal/cli/root/model/model.go b/mesheryctl/internal/cli/root/model/model.go index de7b1b277a2..1d003675b15 100644 --- a/mesheryctl/internal/cli/root/model/model.go +++ b/mesheryctl/internal/cli/root/model/model.go @@ -40,6 +40,8 @@ var ( // flag used to specify format of output of view {model-name} command outFormatFlag string + // flag used to specify output location of export {model-name} command + outLocationFlag string // flag used to specify format of output of export {model-name} command outTypeFlag string // flag used to specify whether to include components in the model @@ -142,6 +144,7 @@ func init() { listModelCmd.Flags().IntVarP(&pageNumberFlag, "page", "p", 1, "(optional) List next set of models with --page (default = 1)") viewModelCmd.Flags().StringVarP(&outFormatFlag, "output-format", "o", "yaml", "(optional) format to display in [json|yaml]") + exportModal.Flags().StringVarP(&outTypeFlag, "output-location", "l", "./", "(optional) output location (default = current directory)") exportModal.Flags().StringVarP(&outTypeFlag, "output-type", "o", "yaml", "(optional) format to display in [json|yaml] (default = yaml)") exportModal.Flags().BoolVarP(&includeCompsFlag, "include-components", "c", false, "whether to include components in the model definition (default = false)") exportModal.Flags().BoolVarP(&includeRelsFlag, "include-relationships", "r", false, "whether to include components in the model definition (default = false)") @@ -279,7 +282,7 @@ func exportModel(modelName string, cmd *cobra.Command, url string, displayCountO resp, err := utils.MakeRequest(req) if err != nil { - utils.Log.Error(fmt.Errorf("Could not reach meshery server: %s", err)) + utils.Log.Error(err) return err } @@ -288,28 +291,27 @@ func exportModel(modelName string, cmd *cobra.Command, url string, displayCountO data, err := io.ReadAll(resp.Body) if err != nil { - utils.Log.Error(fmt.Errorf("Invalid response from meshery server: %s", err)) + utils.Log.Error(err) return err } modelsResponse := &models.MeshmodelsAPIResponse{} err = json.Unmarshal(data, modelsResponse) if err != nil { - utils.Log.Error(fmt.Errorf("Invalid response from meshery server: %s", err)) + utils.Log.Error(err) return err } model := modelsResponse.Models[0] // Convert it to the required output type and write it - if(outTypeFlag == "yaml"){ - err = model.WriteModelDefinition(filepath.Join("./", modelName), "yaml") + if outTypeFlag == "yaml" { + err = model.WriteModelDefinition(filepath.Join(outLocationFlag, modelName), "yaml") } - if(outTypeFlag == "json"){ - err = model.WriteModelDefinition(filepath.Join("./", modelName), "json") + if outTypeFlag == "json" { + err = model.WriteModelDefinition(filepath.Join(outLocationFlag, modelName), "json") } if err != nil { - utils.Log.Error(fmt.Errorf("Could not write model file: %s", err)) utils.Log.Error(err) return err } return nil -} \ No newline at end of file +} diff --git a/mesheryctl/internal/cli/root/model/search.go b/mesheryctl/internal/cli/root/model/search.go index bbd1e52fa6d..8f8da17b365 100644 --- a/mesheryctl/internal/cli/root/model/search.go +++ b/mesheryctl/internal/cli/root/model/search.go @@ -108,4 +108,4 @@ mesheryctl model search [query-text] return nil }, -} \ No newline at end of file +} From 2ad143a355e0440ed07b41381c17a6a8d5453839 Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Tue, 9 Jul 2024 03:55:53 +0530 Subject: [PATCH 3/5] chore: update meshkit version Signed-off-by: Nithish Karthik --- go.mod | 3 ++- go.sum | 4 ++-- mesheryctl/internal/cli/root/registry/generate.go | 2 +- mesheryctl/internal/cli/root/registry/publish.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 67191eb96b0..ac5f4f36d23 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ replace ( github.com/docker/cli => github.com/docker/cli v23.0.6+incompatible github.com/docker/docker => github.com/docker/docker v23.0.6+incompatible github.com/kubernetes/kompose => github.com/meshery/kompose v1.26.2-0.20230425025309-3bb778d54007 + k8s.io/client-go => k8s.io/client-go v0.28.3 k8s.io/kubectl => k8s.io/kubectl v0.28.3 oras.land/oras-go v1.2.4 => oras.land/oras-go v1.2.3 @@ -39,7 +40,7 @@ require ( github.com/jinzhu/copier v0.4.0 github.com/layer5io/gowrk2 v0.6.1 github.com/layer5io/meshery-operator v0.7.0 - github.com/layer5io/meshkit v0.7.43 + github.com/layer5io/meshkit v0.7.44 github.com/layer5io/meshsync v0.6.24 github.com/layer5io/nighthawk-go v1.0.3 github.com/layer5io/service-mesh-performance v0.6.1 diff --git a/go.sum b/go.sum index 30ddff362db..90f7552f078 100644 --- a/go.sum +++ b/go.sum @@ -1610,8 +1610,8 @@ github.com/layer5io/gowrk2 v0.6.1/go.mod h1:ugxQ23+HwQ8dmZYJd1LScw/TLKbdgfN6OOtg github.com/layer5io/meshery-operator v0.7.0 h1:YXlnsx2Xy5duM+W99vts2fFV4C1KnOCytQi2fxdQTUc= github.com/layer5io/meshery-operator v0.7.0/go.mod h1:mVMpSrvSH1zgSmcjzk+/astXV5L34NlL/PcZMH6s2IU= github.com/layer5io/meshkit v0.2.7/go.mod h1:QvEKV8wIEOabiFlUgiu+s78GpJTsRpoRw5pgvEX077Y= -github.com/layer5io/meshkit v0.7.43 h1:Lks7xSFP4k/EV4oZiteHwpmmisNReOODyWDIDwm7zaE= -github.com/layer5io/meshkit v0.7.43/go.mod h1:IglNCfT8xfBjw0SXkVPfJocUHDLfng/QjTb8o52D88s= +github.com/layer5io/meshkit v0.7.44 h1:95OfVrRtzhCtBRrnRVP6qS/01m59oAFbHZiWMVDAPao= +github.com/layer5io/meshkit v0.7.44/go.mod h1:IglNCfT8xfBjw0SXkVPfJocUHDLfng/QjTb8o52D88s= github.com/layer5io/meshsync v0.6.24 h1:ui/u89NW2yHyCtdVaJuuzrag5a1CbhVB8Lp70/9Y+lw= github.com/layer5io/meshsync v0.6.24/go.mod h1:0qI6ATBvkVx10C1ymH62NaGPy85ALFF3T9Dx/IEXfy0= github.com/layer5io/nighthawk-go v1.0.3 h1:AGhip7TM8FjaDJ58jU/7BoPx+O45S7UNImfw7vC2Z0U= diff --git a/mesheryctl/internal/cli/root/registry/generate.go b/mesheryctl/internal/cli/root/registry/generate.go index b0bce0f2f30..c8fbb346551 100644 --- a/mesheryctl/internal/cli/root/registry/generate.go +++ b/mesheryctl/internal/cli/root/registry/generate.go @@ -441,4 +441,4 @@ func init() { generateCmd.MarkFlagsMutuallyExclusive("spreadsheet-cred", "registrant-cred") generateCmd.PersistentFlags().StringVarP(&outputLocation, "output", "o", "../server/meshmodel", "location to output generated models, defaults to ../server/meshmodels") -} \ No newline at end of file +} diff --git a/mesheryctl/internal/cli/root/registry/publish.go b/mesheryctl/internal/cli/root/registry/publish.go index 72c7b9ebb60..fc21b564749 100644 --- a/mesheryctl/internal/cli/root/registry/publish.go +++ b/mesheryctl/internal/cli/root/registry/publish.go @@ -278,4 +278,4 @@ func WriteModelDefToFileSystem(model *utils.ModelCSV, version string, location s } return modelDefPath, &modelDef, nil -} \ No newline at end of file +} From 320615dc5a48a63f4d4752a25542c884a9cbc5da Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Tue, 9 Jul 2024 17:27:32 +0530 Subject: [PATCH 4/5] feat: Add support for oci Signed-off-by: Nithish Karthik --- mesheryctl/internal/cli/root/model/model.go | 24 ++++++++++++++++----- server/handlers/meshery_pattern_handler.go | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/mesheryctl/internal/cli/root/model/model.go b/mesheryctl/internal/cli/root/model/model.go index 1d003675b15..a2027f1772f 100644 --- a/mesheryctl/internal/cli/root/model/model.go +++ b/mesheryctl/internal/cli/root/model/model.go @@ -6,7 +6,7 @@ // // http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software +// Unless required by a, filepath.Dir(${1:}modelDefPathpplicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and @@ -27,6 +27,7 @@ import ( "github.com/layer5io/meshery/mesheryctl/pkg/utils" "github.com/layer5io/meshery/server/models" "github.com/layer5io/meshkit/models/meshmodel/core/v1beta1" + "github.com/layer5io/meshkit/models/oci" "github.com/manifoldco/promptui" "github.com/pkg/errors" log "github.com/sirupsen/logrus" @@ -144,7 +145,7 @@ func init() { listModelCmd.Flags().IntVarP(&pageNumberFlag, "page", "p", 1, "(optional) List next set of models with --page (default = 1)") viewModelCmd.Flags().StringVarP(&outFormatFlag, "output-format", "o", "yaml", "(optional) format to display in [json|yaml]") - exportModal.Flags().StringVarP(&outTypeFlag, "output-location", "l", "./", "(optional) output location (default = current directory)") + exportModal.Flags().StringVarP(&outLocationFlag, "output-location", "l", "./", "(optional) output location (default = current directory)") exportModal.Flags().StringVarP(&outTypeFlag, "output-type", "o", "yaml", "(optional) format to display in [json|yaml] (default = yaml)") exportModal.Flags().BoolVarP(&includeCompsFlag, "include-components", "c", false, "whether to include components in the model definition (default = false)") exportModal.Flags().BoolVarP(&includeRelsFlag, "include-relationships", "r", false, "whether to include components in the model definition (default = false)") @@ -304,14 +305,27 @@ func exportModel(modelName string, cmd *cobra.Command, url string, displayCountO model := modelsResponse.Models[0] // Convert it to the required output type and write it if outTypeFlag == "yaml" { - err = model.WriteModelDefinition(filepath.Join(outLocationFlag, modelName), "yaml") + err = model.WriteModelDefinition(filepath.Join(outLocationFlag, modelName, "model.yaml"), "yaml") } if outTypeFlag == "json" { - err = model.WriteModelDefinition(filepath.Join(outLocationFlag, modelName), "json") + err = model.WriteModelDefinition(filepath.Join(outLocationFlag, modelName, "model.json"), "json") + } + if outTypeFlag == "oci" { + // write model as yaml temporarily + modelDir := filepath.Join(outLocationFlag, modelName) + err = model.WriteModelDefinition(filepath.Join(modelDir, "model.yaml"), "yaml") + // build oci image for the model + img, err := oci.BuildImage(modelDir) + if err != nil { + utils.Log.Error(err) + return err + } + oci.SaveOCIArtifact(img, outLocationFlag+modelName+".tar", modelName) + os.RemoveAll(modelDir) } if err != nil { utils.Log.Error(err) return err } return nil -} +} \ No newline at end of file diff --git a/server/handlers/meshery_pattern_handler.go b/server/handlers/meshery_pattern_handler.go index 6f0d55c391d..3b5787fbcf6 100644 --- a/server/handlers/meshery_pattern_handler.go +++ b/server/handlers/meshery_pattern_handler.go @@ -2074,4 +2074,4 @@ func createArtifactHubPkg(pattern *models.MesheryPattern, user string) ([]byte, } return data, nil -} +} \ No newline at end of file From 2d764793abb5497009e71cd12a7f8d50fbe936dc Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Tue, 9 Jul 2024 23:06:11 +0530 Subject: [PATCH 5/5] chore: Upgrade meshkit Signed-off-by: Nithish Karthik --- go.mod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 65866987c04..fdac9564ea5 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/jinzhu/copier v0.4.0 github.com/layer5io/gowrk2 v0.6.1 github.com/layer5io/meshery-operator v0.7.0 - github.com/layer5io/meshkit v0.7.46 + github.com/layer5io/meshkit v0.7.47 github.com/layer5io/meshsync v0.6.24 github.com/layer5io/nighthawk-go v1.0.3 github.com/layer5io/service-mesh-performance v0.6.1 @@ -334,4 +334,3 @@ require ( sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect -)