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

YAML Parsing Error When Importing OCI Image via URL Import #650

Open
souvikinator opened this issue Jan 22, 2025 · 4 comments
Open

YAML Parsing Error When Importing OCI Image via URL Import #650

souvikinator opened this issue Jan 22, 2025 · 4 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@souvikinator
Copy link
Contributor

Current Behavior

When attempting to upload an exported OCI image from a URL in Meshery, the import process fails with a YAML parsing error. This prevents the successful import of the model.

file used: https://github.com/souvikinator/my_configs/blob/master/apisix.tar

The same file imports successfully when using the file import method instead of the URL import option.

Expected Behavior

The OCI image should import successfully without encountering YAML parsing issues. Meshery should validate and process the uploaded image seamlessly.

Screenshots/Logs

Image

Environment

  • Host OS: Mac Linux Windows
  • Platform: Docker or Kubernetes
  • Meshery Server Version: stable-v0.8.19
  • Meshery Client Version: stable-v0.8.19

Contributor Guides and Handbook

@souvikinator souvikinator added the kind/bug Something isn't working label Jan 22, 2025
@souvikinator souvikinator changed the title YAML Parsing Error When Importing OCI Image via URL Import, YAML Parsing Error When Importing OCI Image via URL Import Jan 22, 2025
@souvikinator
Copy link
Contributor Author

@leecalcote The issue occurred because the URL pointed to the GitHub page (HTML) instead of the raw file, leading to errors in parsing. Using the raw GitHub URL, such as https://github.com/souvikinator/my_configs/raw/master/apisix.tar, resolves the problem as it directly links to the file.

While the import now works, there's a need for:

  1. Robust file type detection to prevent similar issues from propagating. The current error messaging can be misleading due to the content of type HTML being propagated down the pipeline.
  2. Providing more context from a UI perspective would enhance clarity (what file types are supported over URL import, specifically mentioning about GitHub URLs, etc)

Image

Switching to the raw file URL addresses the issue effectively, but improving detection and feedback mechanisms would make the process more user-friendly and reliable.

@amitamrutiya FYI

@souvikinator
Copy link
Contributor Author

souvikinator commented Jan 24, 2025

I'll create a pull request addressing the first point linking to this issue. Currently, with the URL import, if we cannot detect the file type, we set it to "unknown" and allow the content to proceed through the pipeline. Instead, we could block it at that point and provide a relevant message.

According to the code, the URL import should cover the following file types:

  • OCI artifacts / Tar archives (.tar)
  • Zip archives (.zip)
  • Gzip archives (.tar.gz)
  • YAML files (.yaml, .yml)

Am I missing any other file types?

@leecalcote
Copy link
Member

@souvikinator .json

@leecalcote
Copy link
Member

@souvikinator fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants