meshery / meshery

Meshery, the cloud native manager
https://meshery.io
Apache License 2.0
4.97k stars 1.54k forks source link

[mesheryctl] Issue Converting Helm Chart to Kubernetes Manifest when Importing Design via URL #10960

Closed singh1203 closed 4 days ago

singh1203 commented 2 weeks ago

See mesheryctl Command Tracker for current status of commands.

Current Behavior

The error occurs importing design patterns via URL with mesheryctl pattern import. The issue arises during Helm Chart to Kubernetes Manifest conversion. Importing succeeds with local files.

File link: https://raw.githubusercontent.com/meshery/meshery.io/master/catalog/c40ae08b-deaa-4fc5-a1e8-8081907b64a3.yaml

Desired Behavior

Screenshots/Logs

Screenshot from 2024-05-15 11-32-33

Environment


Contributor Guides and Handbook

singh1203 commented 2 weeks ago

@MUzairS15

github-actions[bot] commented 2 weeks ago

This issue has been labeled with 'component/mesheryctl'. Note that after making changes you need to update it in the mesheryctl command tracker spreadsheet.


        Be sure to join the community, if you haven't yet and please leave a :star: star on the project :smile:

MUzairS15 commented 2 weeks ago

Add links/files that you are trying with.

singh1203 commented 2 weeks ago

Add links/files that you are trying with.

Added to the description.

lekaf974 commented 2 weeks ago

@singh1203 I tested this issue and have the same behavior

On meshery server there is this error

meshery-meshery-1     | time="2024-05-17T02:09:56Z" level=error msg="file '/tmp/c40ae08b-deaa-4fc5-a1e8-8081907b64a3.yaml' seems to be a YAML file, but expected a gzipped archive" app=meshery code=meshery-server-1136 probable-cause="unable to convert helm chart to design.helm chart may be corrupted.incorrect source type selected" severity=2 short-description="Failed to convert helm chart to design" suggested-remediation="check if the helm chart is valid and not corrupted.check if the source type selected is Helm Chart

on mesheryctl seeing the same output reported

Unable to create a response from requestResponse Status Code 500, possibly Server error

also after calling the API I am seeing that helm chart support only .tgz files which explain the current behavior

  {
    "design_type": "Helm Chart",
    "supported_extensions": [
      ".tgz"
    ]
  },

Looks we need to enhance error handling on mesheryctl side @MUzairS15, @leecalcote ?

lekaf974 commented 2 weeks ago

After dig in it seems the server only return error 500 will continue investigate and grab more details to see if I could make a fix so that mesheryctl display an error more useful for end user

MUzairS15 commented 1 week ago

@saurabh100ni You are using a design file but specifying helm as source type in imports.

MUzairS15 commented 1 week ago

So @lekaf974 the issue is that meshsryctl is not handling sourcetype flag correctly. On local file import if source type specified is helm even then it should fail as we have provided a design file.

will you ensure source type is used correctly.

If source type is other than helm supported options are local imports and remote url imports.

otherwise for helm only remote url imports and if loval file ref is provided it should give appropriate error.

MUzairS15 commented 1 week ago

As a next iteration we can support importing helm charts from local files with mesheryctl.