carvel-dev / carvel-dev/ytt

Provide a friendlier error message when YAML parsing fails

Open
#491 0 comments 3 reactions 0 assignees View on GitHub
enhancement error msg improvement priority/unprioritized-backlog
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem/challenge you have**

> I did a mistake as I copied the lines from the *.star file which is indeed not a yaml file.
> Nevertheless, the wording reported:
> ```
> ytt: Error: Unmarshaling YAML template 'values.yml': yaml: line 12: did not find expected
> ```
> is not really helpfull

https://kubernetes.slack.com/archives/CH8KCCKA5/p1632129604333300

**Describe the solution you'd like**
Provide an error message that makes it understandable to non yaml experts but also gives the actual underlying error which could be helpful for more advanced "yaml engineers". ([ref](https://kubernetes.slack.com/archives/CH8KCCKA5/p1632147054337500?thread_ts=1632129604.333300&cid=CH8KCCKA5))

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Research direction

The issue does not name a file, test, or entry point. Locate ytt's YAML parsing error handling, then add wording that is understandable to non-experts while retaining the underlying parser error; add or update coverage for the reported invalid YAML case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.