Skip to content

Commit

Permalink
eliminate merge conflicts in provider-ui
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Calcote <[email protected]>
  • Loading branch information
leecalcote committed Sep 10, 2024
2 parents e158222 + d45c37f commit 697f1ad
Show file tree
Hide file tree
Showing 1,093 changed files with 109,165 additions and 20,218 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-and-release-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,17 @@ jobs:
- build
name: Deploy CNCF Playground
uses: meshery/meshery/.github/workflows/cncf-playground-deploy-meshery.yaml@master
with:
image: ${{ secrets.IMAGE_NAME }}:playground-${GITHUB_REF/refs\/tags\//}
secrets: inherit


call-meshery-extensions-playground-rollout:
needs:
- build
name: Deploy CNCF Extensions Playground
uses: layer5labs/meshery-extensions-packages/.github/workflows/deploy-meshery-extensions-playground.yml@master
secrets: inherit

email-on-failure:
needs: [update-rest-api-docs, update-graphql-docs, build, ctlrelease, call-dde-release-workflow, call-helm-chart-releaser, email-meshery-release-notes-workflow, call-cncf-playground-rollout]
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/discuss/meshery.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_data/discuss/mesheryctl.json

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions docs/_models/meshery-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ components:
colorIcon: assets/img/integrations/meshery-core/components/pencil/icons/color/pencil-color.svg
whiteIcon: assets/img/integrations/meshery-core/components/pencil/icons/white/pencil-white.svg
description:
- name: pen
colorIcon: assets/img/integrations/meshery-core/components/pen/icons/color/pen-color.svg
whiteIcon: assets/img/integrations/meshery-core/components/pen/icons/white/pen-white.svg
description:
featureList: [
"Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads.",
"Invite anyone to review and make changes to your private designs.",
Expand Down
46 changes: 46 additions & 0 deletions docs/_releases/v0.7.94.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: release
date: 2024-09-10
tag: v0.7.94
prerelease: false
---

## What's New
## 🔤 General
- [Relationships] Remove container relationship @MUzairS15 (#11946)
- [Relationships] Remove relationships between internal K8s resources. @MUzairS15 (#11935)
- [Model] Simple Line Icons: Add styling capabilities to Doc, Folder, and ArrowUp components @leecalcote (#11927)
- [Models] Add meshery-simple-line-icons model @leecalcote (#11926)
- [Fix]: build and release docker extension @jerensl (#11924)

## ⌨️ Meshery CLI

- update component w/signoff @Jougan-0 (#11923)

## 🖥 Meshery UI

- Refactor/remove cypress @senthil-athiban (#11914)
- Update Build and Release workflow @MUzairS15 (#11949)
- [UI] Add intersection observer for components and relationship tabs @amitamrutiya (#11829)
- inject can @aabidsofi19 (#11940)
- Added Meshery design embed extension to Meshery-UI @Aviral0702 (#11865)
- [Test] Fix all failing and skipped e2e test @jerensl (#11919)
- Adding playwright tests for performance page @yash37158 (#11811)
- fix: remove unused vars @codeSafari10 (#11920)
- fix: tap on dry run not working @codeSafari10 (#11913)

## 🧰 Maintenance

- Update Build and Release workflow @MUzairS15 (#11949)

## 📖 Documentation

- Change mesheyctl to mesheryctl @Alero-Awani (#11948)
- [docs] Update the dead link in Contribute to Models page @Vijaykv5 (#11931)
- Adding playwright tests for performance page @yash37158 (#11811)

## 👨🏽‍💻 Contributors

Thank you to our contributors for making this release possible:
@Alero-Awani, @Aviral0702, @Jougan-0, @MUzairS15, @Vijaykv5, @Yashsharma1911, @aabidsofi19, @amitamrutiya, @codeSafari10, @jerensl, @leecalcote, @senthil-athiban, @sudhanshutech, @vishalvivekm and @yash37158

8 changes: 4 additions & 4 deletions docs/pages/guides/mesheryctl/system-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ Let's get familiar with mesheryctl system commands. The syntax of the mesheryctl

## Main_command : system channel
### channel
`mesheyctl system channel set [stable|stable-version|edge|edge-version]` : Used to set the channel.
`mesheryctl system channel set [stable|stable-version|edge|edge-version]` : Used to set the channel.

`mesheyctl system channel switch [stable|stable-version|edge|edge-version]` : Used to switch between channels.
`mesheryctl system channel switch [stable|stable-version|edge|edge-version]` : Used to switch between channels.

<a href="{{ site.baseurl }}/assets/img/syscmd/channel set.png"><img alt="skip-browser" style="width:500px;height:auto;" src="{{ site.baseurl }}/assets/img/syscmd/channel set.png" /></a>

`mesheyctl system channel view --all` : Displays all available channels.
`mesheryctl system channel view --all` : Displays all available channels.

`mesheyctl system channel view` : Displays the current channel.
`mesheryctl system channel view` : Displays the current channel.

<a href="{{ site.baseurl }}/assets/img/syscmd/channel view.png"><img alt="skip-browser" style="width:500px;height:auto;" src="{{ site.baseurl }}/assets/img/syscmd/channel view.png" /></a>

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guides/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ abstract: "Explore the tutorials to learn how to use Meshery for collaboratively
permalink: guides/tutorials
redirect_from: guides/tutorials/
---
Explore these tutorials to learn how to use Meshery for collaboratively managing infrastructure. Access the [Meshery Playground]({{site.baseurl}}/installation/playground) as a convenient resource for the labs in these tutorials.
🧑‍🔬 Explore these tutorials to learn how to use Meshery for collaboratively managing infrastructure. Access the [Meshery Playground]({{site.baseurl}}/installation/playground) as a convenient resource for the labs in these tutorials.

{% assign tutorials = site.pages | where: "category", "tutorials" %}

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ list: exclude
<ul class="section-title">
{% assign sorted_tutorials = site.pages | where: "type","guides" %}
{% for item in sorted_tutorials %}
{% if item.type=="guides" and item.category=="tutorials" and item.language=="en" -%}
{% if item.type=="guides" and item.category=="tutorials" and item.list=="include" and item.language=="en" -%}
<li><a href="{{ site.baseurl }}{{ item.url }}">{{ item.title }}</a>
{% if item.abstract != " " %}
- {{ item.abstract }}
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/project/contributing/contributing-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ list: include

Meshery's internal object model is designed to provide a consistent and extensible way of capturing and characterizing the resources under Meshery's management and the capabilities Meshery has at its disposal. Meshery Models serve as the unit of packaging for the object models that define a registered capability or a type of managed infrastructure and their relationships, and details specifics of how to manage them.Models often represent infrastructure and application technologies, however, they are also capable of defining other types of entities like annotations, like shapes (infrastructure ambiguous components). Models are used to define the capabilities of Meshery. _See [Models]({{site.baseurl}}/concepts/logical/models) to learn more about models as a logical concept._

Each model includes a set of entities (in the form of definitions) that Meshery can manage. Models are defined and versioned using on the [Model Schema](https://github.com/meshery/schemas/blob/master/openapi/schemas/meshmodels.yml). The schema defines the structure of the model, including the entities it contains, their relationships, and the properties they have. The schema also defines the version of the model and the version of the schema itself. _See [Registry]({{site.baseurl}}/concepts/logical/registry) to learn more about Meshery's internal registry and how to use it._
Each model includes a set of entities (in the form of definitions) that Meshery can manage. Models are defined and versioned using on the [Model Schema](https://github.com/meshery/schemas/blob/master/schemas/constructs/openapi/meshmodels.yml). The schema defines the structure of the model, including the entities it contains, their relationships, and the properties they have. The schema also defines the version of the model and the version of the schema itself. _See [Registry]({{site.baseurl}}/concepts/logical/registry) to learn more about Meshery's internal registry and how to use it._

[![Model Entity Classification]({{ site.baseurl }}/assets/img/meshmodel/meshmodel-architecture.svg)]({{ site.baseurl }}/assets/img/concepts/meshery-models.png)
_Figure: Model Entity Classification_
Expand Down
9 changes: 9 additions & 0 deletions docs/pages/reference/mesheryctl/mesheryctl-registry-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,21 @@ mesheryctl registry update --spreadsheet-id 1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdw
</div>
</pre>

Updating models in the meshery/meshery repo based on flag
<pre class='codeblock-pre'>
<div class='codeblock'>
mesheryctl registry update --spreadsheet-id 1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw --spreadsheet-cred $CRED --model "[model-name]"

</div>
</pre>

## Options

<pre class='codeblock-pre'>
<div class='codeblock'>
-h, --help help for update
-i, --input string relative or absolute input path to the models directory (default "../server/meshmodel")
-m, --model string specific model name to be generated
--spreadsheet-cred string base64 encoded credential to download the spreadsheet
--spreadsheet-id string spreadsheet it for the integration spreadsheet

Expand Down
116 changes: 60 additions & 56 deletions mesheryctl/internal/cli/root/registry/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"context"
"fmt"
"io"
"net/url"
"os"
"path/filepath"
"reflect"
Expand All @@ -32,10 +31,8 @@ import (

"github.com/layer5io/meshery/mesheryctl/pkg/utils"
"github.com/layer5io/meshkit/generators"
"github.com/layer5io/meshkit/generators/github"
mutils "github.com/layer5io/meshkit/utils"
"github.com/layer5io/meshkit/utils/store"
"github.com/layer5io/meshkit/utils/walker"
"github.com/meshery/schemas/models/v1beta1/component"
v1beta1Model "github.com/meshery/schemas/models/v1beta1/model"

Expand Down Expand Up @@ -204,15 +201,14 @@ func InvokeGenerationFromSheet(wg *sync.WaitGroup) error {
if err != nil {
break
}

wg.Add(1)
go func(model utils.ModelCSV) {
defer func() {
wg.Done()
weightedSem.Release(1)
}()
if mutils.ReplaceSpacesAndConvertToLowercase(model.Registrant) == "meshery" {
err = GenerateDefsForCoreRegistrant(model)
err = GenerateDefsForCoreRegistrant(model, componentCSVHelper)
if err != nil {
utils.LogError.Error(err)
}
Expand Down Expand Up @@ -403,78 +399,86 @@ func assignDefaultsForCompDefs(componentDef *component.ComponentDefinition, mode

// For registrants eg: meshery, whose components needs to be directly created by referencing meshery/schemas repo.
// the sourceURL contains the path of models component definitions
func GenerateDefsForCoreRegistrant(model utils.ModelCSV) error {
totalComps := 0
func GenerateDefsForCoreRegistrant(model utils.ModelCSV, ComponentCSVHelper *utils.ComponentCSVHelper) error {
var version string
parts := strings.Split(model.SourceURL, "/")
// Assuming the URL is always of the format "protocol://github.com/owner/repo/tree/definitions/{model-name}/version/components"
// We know the version is the 7th element (0-indexed) in the split URL
if len(parts) >= 8 {
version = parts[8] // Fetch the version from the expected position
} else {
return fmt.Errorf("invalid SourceURL format: %s", model.SourceURL)
}
isModelPublished, _ := strconv.ParseBool(model.PublishToRegistry)
var compDefComps []component.ComponentDefinition
alreadyExist := false
actualCompCount := 0
defer func() {
modelToCompGenerateTracker.Set(model.Model, compGenerateTracker{
totalComps: totalComps,
totalComps: len(compDefComps) - actualCompCount,
version: version,
})
}()

path, err := url.Parse(model.SourceURL)
modelDirPath, compDirPath, err := createVersionedDirectoryForModelAndComp(version, model.Model)
if err != nil {
err = ErrGenerateModel(err, model.Model)
utils.LogError.Error(err)
return nil
}
gitRepo := github.GitRepo{
URL: path,
PackageName: model.Model,
return err
}
owner, repo, branch, root, err := gitRepo.ExtractRepoDetailsFromSourceURL()
modelDef, alreadyExists, err := writeModelDefToFileSystem(&model, version, modelDirPath)
if err != nil {
err = ErrGenerateModel(err, model.Model)
utils.LogError.Error(err)
return nil
return ErrGenerateModel(err, model.Model)
}

isModelPublished, _ := strconv.ParseBool(model.PublishToRegistry)
//Initialize walker
gitWalker := walker.NewGit()
if isModelPublished {
gw := gitWalker.
Owner(owner).
Repo(repo).
Branch(branch).
Root(root).
RegisterFileInterceptor(func(f walker.File) error {
// Check if the file has a JSON extension
if filepath.Ext(f.Name) != ".json" {
return nil
alreadyExist = alreadyExists
for registrant, models := range ComponentCSVHelper.Components {
if registrant != "meshery" {
continue
}
for _, comps := range models {
for _, comp := range comps {
if comp.Model != model.Model {
continue
}
contentBytes := []byte(f.Content)
var componentDef component.ComponentDefinition
if err := encoding.Unmarshal(contentBytes, &componentDef); err != nil {
return err
}
version = componentDef.Model.Model.Version
modelDirPath, compDirPath, err := createVersionedDirectoryForModelAndComp(version, model.Model)
componentDef, err = comp.CreateComponentDefinition(isModelPublished, "v1.0.0")
if err != nil {
err = ErrGenerateModel(err, model.Model)
return err
}
modelDef, alreadyExist, err := writeModelDefToFileSystem(&model, version, modelDirPath) // how to infer this? @Beginner86 any idea? new column?
if err != nil {
return ErrGenerateModel(err, model.Model)
}
if alreadyExist {
utils.Log.Info("Model already exists: ", model.Model)
utils.Log.Error(ErrUpdateComponent(err, modelName, comp.Component))
continue
}
componentDef.Model = *modelDef
_, err = componentDef.WriteComponentDefinition(compDirPath)

alreadyExists, err = componentDef.WriteComponentDefinition(compDirPath)
if err != nil {
err = ErrGenerateComponent(err, model.Model, componentDef.DisplayName)
err = ErrGenerateComponent(err, comp.Model, componentDef.DisplayName)
utils.LogError.Error(err)
}
if alreadyExists {
actualCompCount++
}
compDefComps = append(compDefComps, componentDef)
}
}
}

return nil
})
err = gw.Walk()
if err != nil {
return err
if !alreadyExist {
if len(compDefComps) == 0 {
utils.LogError.Error(ErrGenerateModel(fmt.Errorf("no components found for model "), model.Model))
} else if len(compDefComps)-actualCompCount == 0 {
utils.Log.Info("Current model: ", model.Model)
utils.Log.Info(" no change in components for ", model.ModelDisplayName, " (", model.Model, ")")
} else {
utils.Log.Info("Current model: ", model.Model)
utils.Log.Info(" extracted ", len(compDefComps)-actualCompCount, " components for ", model.ModelDisplayName, " (", model.Model, ")")
}
} else {
if len(compDefComps) > 0 {
if len(compDefComps)-actualCompCount == 0 {
utils.Log.Info("Model already exists: ", model.Model)
} else {
utils.Log.Info("Current model: ", model.Model)
utils.Log.Info(" extracted ", len(compDefComps)-actualCompCount, " components for ", model.ModelDisplayName, " (", model.Model, ")")
}
} else {
utils.LogError.Error(ErrGenerateModel(fmt.Errorf("no components found for model "), model.Model))
}
}

Expand Down
Loading

0 comments on commit 697f1ad

Please sign in to comment.