Meshery: [mesheryctl] Bug: `system reset` on `stable` channel breaks if no version is specified

Created on 4 Feb 2021  路  2Comments  路  Source: layer5io/meshery

Description


When mesheryctl system reset is run it will fetch the docker-compose.yaml file from GitHub corresponding to the channel and version specified in the current-context.

If the channel is stable and the version is not specified in the config.yaml file in the ~/.meshery folder, it will fail to pick up a valid file.

version _is not specified by default when Meshery is installed._

Example config.yaml where system reset fails-

(base) user@computer:~/.meshery$ cat config.yaml 
contexts:
  local:
    endpoint: http://localhost:9081
    token:
      name: Default
      location: auth.json
    platform: kubernetes
    adapters:
    - meshery-istio
    - meshery-linkerd
    - meshery-consul
    - meshery-octarine
    - meshery-nsm
    - meshery-kuma
    - meshery-cpx
    - meshery-osm
    - meshery-nginx-sm
    channel: stable #stable channel but version is not specified
current-context: local
tokens: {}

Here, system reset will try to pick up a file from fileURL = "https://raw.githubusercontent.com/layer5io/meshery/" + currVersion + "/docker-compose.yaml" (line 83 in reset.go).

Since there is no current version specified, the URL will be https://raw.githubusercontent.com/layer5io/meshery/docker-compose.yaml which is invalid.

Expected Behavior


Instead if the channel is stable and the version is not specified in the config.yaml file, it should pick up the docker-compose.yaml file from the latest release(_not the edge release but the latest stable release_).

_May need to use GitHub API for this._

componenmesheryctl good first issue kinbug

Most helpful comment

There he is! @aneeshnema 馃挭

All 2 comments

take

There he is! @aneeshnema 馃挭

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aisuko picture Aisuko  路  3Comments

navendu-pottekkat picture navendu-pottekkat  路  4Comments

sakomws picture sakomws  路  4Comments

MukulMaheshwari picture MukulMaheshwari  路  4Comments

leecalcote picture leecalcote  路  4Comments