Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set source-type flag required #11020

Conversation

lekaf974
Copy link
Contributor

@lekaf974 lekaf974 commented May 23, 2024

Notes for Reviewers

This PR fixes #10960

Signed commits

  • Yes, I signed my commits.

Due to non provided source type, the server returned the error. To avoid this behavior the -s/--source-type flag is now required

new behavior

[xxx@xxx mesheryctl]$ mesheryctl pattern import -f https://raw.githubusercontent.com/meshery/meshery.io/master/catalog/c40ae08b-deaa-4fc5-a1e8-8081907b64a3.yaml
source-type not provided
Error: No manifest source-type detected

@github-actions github-actions bot added the component/mesheryctl CLI for Meshery label May 23, 2024
Copy link

github-actions bot commented May 23, 2024

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 9.13%. Comparing base (17acf25) to head (41a1af5).
Report is 14 commits behind head on master.

Current head 41a1af5 differs from pull request most recent head 8283674

Please upload reports for the commit 8283674 to get more accurate results.

Files Patch % Lines
mesheryctl/internal/cli/root/pattern/import.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11020      +/-   ##
==========================================
+ Coverage    9.00%    9.13%   +0.12%     
==========================================
  Files         146      146              
  Lines       19274    19283       +9     
==========================================
+ Hits         1736     1761      +25     
+ Misses      17236    17220      -16     
  Partials      302      302              
Flag Coverage Δ
unittests 9.13% <66.66%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leecalcote
Copy link
Member

@Yashsharma1911 @MUzairS15 does Meshery Server still not auto-detect design source type?

MUzairS15
MUzairS15 previously approved these changes May 24, 2024
mesheryctl/internal/cli/root/pattern/error.go Outdated Show resolved Hide resolved
mesheryctl/internal/cli/root/pattern/error.go Outdated Show resolved Hide resolved
mesheryctl/internal/cli/root/pattern/error.go Outdated Show resolved Hide resolved
@MUzairS15
Copy link
Contributor

@lekaf974 please don’t assign new error code value manually.
https://docs.meshery.io/project/contributing/contributing-error

Just define the new error and the utility will take care of it.
Use make error-util from mesheryctl

@MUzairS15
Copy link
Contributor

Will you address the lint checks?

@github-actions github-actions bot added area/docs Documentation update needed area/ci Continuous Integration component/ui User Interface component/server area/models Models, Components, Relationships related changes labels May 24, 2024
@lekaf974 lekaf974 force-pushed the bug/issue-10960-mesheryctl-pattern-import-url branch from ba25ce8 to 878a880 Compare May 24, 2024 17:29
@lekaf974
Copy link
Contributor Author

updated but still having issue in file not related to this PR

pkg/utils/model.go:119:27: Error return value of `mcv.UpdateModelDefinition` is not checked (errcheck)
	mcv.UpdateModelDefinition(&model)

@lekaf974 lekaf974 force-pushed the bug/issue-10960-mesheryctl-pattern-import-url branch from 8a87a61 to f38d092 Compare May 28, 2024 02:01
lekaf974 and others added 4 commits May 27, 2024 22:04
Signed-off-by: mevrin <matthieu.evrin@gmail.com>
Signed-off-by: Mohd Uzair <muzair.shaikh810@gmail.com>
Signed-off-by: Mohd Uzair <muzair.shaikh810@gmail.com>
Signed-off-by: mevrin <matthieu.evrin@gmail.com>
@lekaf974 lekaf974 force-pushed the bug/issue-10960-mesheryctl-pattern-import-url branch from f38d092 to e43c10e Compare May 28, 2024 02:07
@MUzairS15
Copy link
Contributor

thanks @lekaf974

@MUzairS15 MUzairS15 merged commit 6ff2200 into meshery:master May 28, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Continuous Integration area/docs Documentation update needed area/models Models, Components, Relationships related changes component/mesheryctl CLI for Meshery component/server component/ui User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mesheryctl] Issue Converting Helm Chart to Kubernetes Manifest when Importing Design via URL
3 participants