Skip to content

Commit

Permalink
Merge branch 'master' into fix-ui-theme-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aabidsofi19 authored Jan 4, 2025
2 parents c99eddd + 0ae1165 commit af1beb4
Show file tree
Hide file tree
Showing 55 changed files with 7,713 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kanvas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
path: action
repository: layer5labs/kanvas-snapshot
- id: test_result
uses: layer5labs/[email protected].20
uses: layer5labs/[email protected].21
with:
githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...."
mesheryToken: ${{ secrets.MESHERY_TOKEN }} # Meshery Cloud Authentication token, signin to meshery-cloud to get one, example: ey.....
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.

7 changes: 7 additions & 0 deletions docs/_meetings/week-of-12-30-2024/Sagnik-Pal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Name: Sagnik Pal

Bio: Heavily interested in anything related to golang, gRPC, GraphQL, Docker, Kubernetes, Linux, Cloud-Native

Github: "https://github.com/palSagnik"

LinkedIn: "https://www.linkedin.com/in/sagnik-pal-iitism/"
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
cuelang.org/go v0.6.0
fortio.org/fortio v1.66.2
github.com/99designs/gqlgen v0.17.45
github.com/Masterminds/semver/v3 v3.2.1
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/briandowns/spinner v1.23.1
github.com/docker/cli v24.0.6+incompatible
Expand Down Expand Up @@ -107,7 +108,6 @@ require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
Expand Down
14 changes: 10 additions & 4 deletions server/handlers/policy_relationship_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
"time"

"github.com/Masterminds/semver/v3"
"github.com/gofrs/uuid"
"github.com/gorilla/mux"
"github.com/layer5io/meshery/server/models"
Expand Down Expand Up @@ -97,7 +98,6 @@ func (h *Handler) EvaluateRelationshipPolicy(
_ = provider.PersistEvent(event)

// Create the event but do not notify the client immediately, as the evaluations are frequent and takes up the view area.
// go h.config.EventBroadcaster.Publish(userUUID, event)
unknownComponents := processEvaluationResponse(h.registryManager, relationshipPolicyEvalPayload, &evaluationResponse)
if len(unknownComponents) > 0 {
event := events.NewEvent().FromUser(userUUID).FromSystem(*h.SystemID).WithCategory("relationship").WithAction("evaluation").WithSeverity(events.Informational).ActedUpon(patternUUID).WithDescription(fmt.Sprintf("Relationship evaluation for \"%s\" at version \"%s\" resulted in the addition of new components but they are not registered inside the registry.", evaluationResponse.Design.Name, evaluationResponse.Design.Version)).WithMetadata(map[string]interface{}{
Expand All @@ -120,6 +120,15 @@ func processEvaluationResponse(registry *registry.RegistryManager, evalPayload p
compsUpdated := []component.ComponentDefinition{}
compsAdded := []component.ComponentDefinition{}

// Bump the version of design
oldVersion, versionParseErr := semver.NewVersion(evalResponse.Design.Version)
if versionParseErr != nil {
oldVersion = semver.MustParse("0.0.0")
}

newVersion := oldVersion.IncPatch()
evalResponse.Design.Version = newVersion.String()

// components which were added by the evaluator based on the relationship definition, but doesn't exist in the registry.
unknownComponents := []*component.ComponentDefinition{}

Expand Down Expand Up @@ -151,7 +160,6 @@ func processEvaluationResponse(registry *registry.RegistryManager, evalPayload p
}
_component, _ := entities[0].(*component.ComponentDefinition)

_c.Configuration = core.Format.Prettify(_c.Configuration, false)
_component.Id = _c.Id
if _c.DisplayName != "" {
_component.DisplayName = _c.DisplayName
Expand All @@ -166,8 +174,6 @@ func processEvaluationResponse(registry *registry.RegistryManager, evalPayload p

for _, component := range evalResponse.Trace.ComponentsUpdated {
_c := component

_c.Configuration = core.Format.Prettify(_c.Configuration, false)
compsUpdated = append(compsUpdated, _c)
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
"capabilities": [
{
"description": "Initiate a performance test. Meshery will execute the load generation, collect metrics, and present the results.",
"displayName": "Performance Test",
"entityState": [
"instance"
],
"key": "",
"kind": "action",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "perf-test",
"type": "operator",
"version": "0.7.0"
},
{
"description": "Configure the workload specific setting of a component",
"displayName": "Workload Configuration",
"entityState": [
"declaration"
],
"key": "",
"kind": "mutate",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "config",
"type": "configuration",
"version": "0.7.0"
},
{
"description": "Configure Labels And Annotations for the component ",
"displayName": "Labels and Annotations Configuration",
"entityState": [
"declaration"
],
"key": "",
"kind": "mutate",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "labels-and-annotations",
"type": "configuration",
"version": "0.7.0"
},
{
"description": "View relationships for the component",
"displayName": "Relationships",
"entityState": [
"declaration",
"instance"
],
"key": "",
"kind": "view",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "relationship",
"type": "configuration",
"version": "0.7.0"
},
{
"description": "View Component Definition ",
"displayName": "Json Schema",
"entityState": [
"declaration",
"instance"
],
"key": "",
"kind": "view",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "definition",
"type": "configuration",
"version": "0.7.0"
},
{
"description": "Configure the visual styles for the component",
"displayName": "Styling",
"entityState": [
"declaration"
],
"key": "",
"kind": "mutate",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "",
"type": "style",
"version": "0.7.0"
},
{
"description": "Change the shape of the component",
"displayName": "Change Shape",
"entityState": [
"declaration"
],
"key": "",
"kind": "mutate",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "shape",
"type": "style",
"version": "0.7.0"
},
{
"description": "Drag and Drop a component into a parent component in graph view",
"displayName": "Compound Drag And Drop",
"entityState": [
"declaration"
],
"key": "",
"kind": "interaction",
"metadata": null,
"schemaVersion": "capability.meshery.io/v1alpha1",
"status": "enabled",
"subType": "compoundDnd",
"type": "graph",
"version": "0.7.0"
}
],
"component": {
"kind": "PrometheusRule",
"schema": "{\n \"description\": \"The `PrometheusRule` custom resource definition (CRD) defines [alerting](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) and [recording](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) rules to be evaluated by `Prometheus` or `ThanosRuler` objects.\\n\\n`Prometheus` and `ThanosRuler` objects select `PrometheusRule` objects using label and namespace selectors.\",\n \"properties\": {\n \"spec\": {\n \"description\": \"Specification of desired alerting rule definitions for Prometheus.\",\n \"properties\": {\n \"groups\": {\n \"description\": \"Content of Prometheus rule file\",\n \"items\": {\n \"description\": \"RuleGroup is a list of sequentially evaluated recording and alerting rules.\",\n \"properties\": {\n \"interval\": {\n \"description\": \"Interval determines how often rules in the group are evaluated.\",\n \"pattern\": \"^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$\",\n \"type\": \"string\"\n },\n \"labels\": {\n \"additionalProperties\": {\n \"type\": \"string\"\n },\n \"description\": \"Labels to add or overwrite before storing the result for its rules.\\nThe labels defined at the rule level take precedence.\\n\\nIt requires Prometheus \\u003e= 3.0.0.\\nThe field is ignored for Thanos Ruler.\",\n \"type\": \"object\"\n },\n \"limit\": {\n \"description\": \"Limit the number of alerts an alerting rule and series a recording\\nrule can produce.\\nLimit is supported starting with Prometheus \\u003e= 2.31 and Thanos Ruler \\u003e= 0.24.\",\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Name of the rule group.\",\n \"minLength\": 1,\n \"type\": \"string\"\n },\n \"partial_response_strategy\": {\n \"description\": \"PartialResponseStrategy is only used by ThanosRuler and will\\nbe ignored by Prometheus instances.\\nMore info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response\",\n \"pattern\": \"^(?i)(abort|warn)?$\",\n \"type\": \"string\"\n },\n \"query_offset\": {\n \"description\": \"Defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.\\n\\nIt requires Prometheus \\u003e= v2.53.0.\\nIt is not supported for ThanosRuler.\",\n \"pattern\": \"^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$\",\n \"type\": \"string\"\n },\n \"rules\": {\n \"description\": \"List of alerting and recording rules.\",\n \"items\": {\n \"description\": \"Rule describes an alerting or recording rule\\nSee Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule\",\n \"properties\": {\n \"alert\": {\n \"description\": \"Name of the alert. Must be a valid label value.\\nOnly one of `record` and `alert` must be set.\",\n \"type\": \"string\"\n },\n \"annotations\": {\n \"additionalProperties\": {\n \"type\": \"string\"\n },\n \"description\": \"Annotations to add to each alert.\\nOnly valid for alerting rules.\",\n \"type\": \"object\"\n },\n \"expr\": {\n \"anyOf\": [\n {\n \"type\": \"integer\"\n },\n {\n \"type\": \"string\"\n }\n ],\n \"description\": \"PromQL expression to evaluate.\",\n \"x-kubernetes-int-or-string\": true\n },\n \"for\": {\n \"description\": \"Alerts are considered firing once they have been returned for this long.\",\n \"pattern\": \"^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$\",\n \"type\": \"string\"\n },\n \"keep_firing_for\": {\n \"description\": \"KeepFiringFor defines how long an alert will continue firing after the condition that triggered it has cleared.\",\n \"minLength\": 1,\n \"pattern\": \"^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$\",\n \"type\": \"string\"\n },\n \"labels\": {\n \"additionalProperties\": {\n \"type\": \"string\"\n },\n \"description\": \"Labels to add or overwrite.\",\n \"type\": \"object\"\n },\n \"record\": {\n \"description\": \"Name of the time series to output to. Must be a valid metric name.\\nOnly one of `record` and `alert` must be set.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"expr\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"name\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\",\n \"x-kubernetes-list-map-keys\": [\n \"name\"\n ],\n \"x-kubernetes-list-type\": \"map\"\n }\n },\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"spec\"\n ],\n \"title\": \"Prometheus Rule\",\n \"type\": \"object\"\n}",
"version": "monitoring.coreos.com/v1"
},
"configuration": null,
"description": "",
"displayName": "Prometheus Rule",
"format": "JSON",
"id": "00000000-0000-0000-0000-000000000000",
"metadata": {
"genealogy": "",
"isAnnotation": false,
"isNamespaced": true,
"published": false,
"source_uri": "https://github.com/prometheus-community/helm-charts/releases/download/kube-prometheus-stack-67.7.0/kube-prometheus-stack-67.7.0.tgz"
},
"model": {
"category": {
"name": "Observability and Analysis"
},
"displayName": "Kube Prometheus Stack",
"id": "00000000-0000-0000-0000-000000000000",
"metadata": {
"isAnnotation": false,
"primaryColor": "#e75225",
"secondaryColor": "#ec7551",
"shape": "circle",
"source_uri": "https://github.com/prometheus-community/helm-charts/releases/download/kube-prometheus-stack-67.7.0/kube-prometheus-stack-67.7.0.tgz",
"styleOverrides": "",
"svgColor": "\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\u003c!DOCTYPE svg\u003e\u003csvg xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" viewBox=\"-3.94 -1.44 438.62 432.87\" height=\"20\" width=\"20\"\u003e\u003cpath xmlns=\"http://www.w3.org/2000/svg\" fill=\"#E75225\" d=\"M215.926 7.068c115.684.024 210.638 93.784 210.493 207.844-.148 115.793-94.713 208.252-212.912 208.169C97.95 423 4.52 329.143 4.601 213.221 4.68 99.867 99.833 7.044 215.926 7.068zm-63.947 73.001c2.652 12.978.076 25.082-3.846 36.988-2.716 8.244-6.47 16.183-8.711 24.539-3.694 13.769-7.885 27.619-9.422 41.701-2.21 20.25 5.795 38.086 19.493 55.822L86.527 225.94c.11 1.978-.007 2.727.21 3.361 5.968 17.43 16.471 32.115 28.243 45.957 1.246 1.465 4.082 2.217 6.182 2.221 62.782.115 125.565.109 188.347.028 1.948-.003 4.546-.369 5.741-1.618 13.456-14.063 23.746-30.079 30.179-50.257l-66.658 12.976c4.397-8.567 9.417-16.1 12.302-24.377 9.869-28.315 5.779-55.69-8.387-81.509-11.368-20.72-21.854-41.349-16.183-66.32-12.005 11.786-16.615 26.79-19.541 42.253-2.882 15.23-4.58 30.684-6.811 46.136-.317-.467-.728-.811-.792-1.212-.258-1.621-.499-3.255-.587-4.893-1.355-25.31-6.328-49.696-16.823-72.987-6.178-13.71-12.99-27.727-6.622-44.081-4.31 2.259-8.205 4.505-10.997 7.711-8.333 9.569-11.779 21.062-12.666 33.645-.757 10.75-1.796 21.552-3.801 32.123-2.107 11.109-5.448 21.998-12.956 32.209-3.033-21.81-3.37-43.38-22.928-57.237zm161.877 216.523H116.942v34.007h196.914v-34.007zm-157.871 51.575c-.163 28.317 28.851 49.414 64.709 47.883 29.716-1.269 56.016-24.51 53.755-47.883H155.985z\"\u003e\u003c/path\u003e\u003c/svg\u003e",
"svgComplete": "",
"svgWhite": "\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\u003c!DOCTYPE svg\u003e\u003csvg xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" viewBox=\"-1.61 2.89 434.72 428.97\" height=\"20\" width=\"20\"\u003e\u003cpath xmlns=\"http://www.w3.org/2000/svg\" fill=\"#FFF\" d=\"M216.412 11.432c114.637.024 208.732 92.935 208.588 205.963-.146 114.745-93.856 206.367-210.985 206.285C99.504 423.599 6.92 330.592 7 215.719c.079-112.328 94.369-204.311 209.412-204.287zm-63.368 72.341c2.628 12.861.075 24.855-3.811 36.653-2.691 8.17-6.411 16.036-8.632 24.317-3.66 13.644-7.813 27.369-9.336 41.324-2.19 20.067 5.743 37.741 19.317 55.316l-62.396-13.06c.109 1.96-.007 2.702.208 3.331 5.914 17.272 16.322 31.824 27.988 45.541 1.234 1.451 4.045 2.197 6.126 2.201 62.214.114 124.428.108 186.642.028 1.93-.002 4.505-.365 5.689-1.603 13.335-13.936 23.531-29.806 29.906-49.802l-66.055 12.859c4.357-8.489 9.331-15.954 12.19-24.156 9.78-28.058 5.726-55.186-8.311-80.771-11.266-20.532-21.657-40.975-16.037-65.72-11.896 11.679-16.465 26.548-19.364 41.871-2.856 15.092-4.539 30.406-6.75 45.718-.314-.462-.722-.804-.785-1.201-.256-1.607-.494-3.226-.581-4.848-1.343-25.081-6.271-49.246-16.671-72.326-6.122-13.586-12.873-27.476-6.562-43.682-4.271 2.239-8.13 4.464-10.897 7.641-8.258 9.482-11.673 20.871-12.551 33.341-.751 10.653-1.779 21.357-3.766 31.833-2.088 11.008-5.399 21.799-12.838 31.917-3.009-21.616-3.342-42.991-22.723-56.722zm160.411 214.562H118.323v33.699h195.132v-33.699zm-156.441 51.108c-.161 28.061 28.59 48.967 64.123 47.45 29.447-1.257 55.509-24.289 53.268-47.45H157.014z\"\u003e\u003c/path\u003e\u003c/svg\u003e"
},
"model": {
"version": "67.7.0"
},
"name": "kube-prometheus-stack",
"registrant": {
"created_at": "0001-01-01T00:00:00Z",
"credential_id": "00000000-0000-0000-0000-000000000000",
"deleted_at": "0001-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"kind": "artifacthub",
"name": "Artifact Hub",
"status": "discovered",
"sub_type": "",
"type": "registry",
"updated_at": "0001-01-01T00:00:00Z",
"user_id": "00000000-0000-0000-0000-000000000000"
},
"connection_id": "00000000-0000-0000-0000-000000000000",
"schemaVersion": "models.meshery.io/v1beta1",
"status": "enabled",
"subCategory": "Monitoring",
"version": "v1.0.0",
"components": null,
"relationships": null,
"components_count": 0,
"relationships_count": 0
},
"schemaVersion": "components.meshery.io/v1beta1",
"status": "enabled",
"styles": {
"primaryColor": "",
"shape": "circle",
"svgColor": "",
"svgWhite": ""
},
"version": "v1.0.0"
}
Loading

0 comments on commit af1beb4

Please sign in to comment.