carvel-dev / carvel-dev/ytt

Implement first round changes to overlay error messages

Open
#286 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

### Why
After the first round of user interviews, we have identified initial desired changes to `ytt`'s overlay error messages.
With this initial change, a user with at least basic exposure to Overlays can more quickly understand what and where the problem is.

### Scenario:
**Given** any ytt execution with overlay errors,
**When** the ytt command is run,
**Then** I expect to see the new error message template filled out with the correct info

### Template Error Message
```
ytt: Error: Overlaying (in order: ):
Expected:
: (, '') to match item in
: ( in '') but matched .

:

:

```
This error message captures the insights gained from both proposed [solution 1](https://hackmd.io/qOdnXOdHQbmP6i7wTOgKMg?view#Solution-1) and [proposed solution 2](https://hackmd.io/qOdnXOdHQbmP6i7wTOgKMg?view#Solution-2).

### Important Note on Acceptance criteria
Given that there are many different scenarios in which an overlay can fail, syntax errors will remain the same as before.
The template error message above is for ["Expects mismatch"](https://hackmd.io/mVrrCDjJQJapmUVUUBeDlw?both#Expects-mismatch), another type of error message is the ["Type mismatch"](https://hackmd.io/mVrrCDjJQJapmUVUUBeDlw?both#Type-mismatch).
More examples and general acceptance criteria is in the [HackMD new error messages guide](https://hackmd.io/mVrrCDjJQJapmUVUUBeDlw?view).

**Notes:**
https://hackmd.io/mVrrCDjJQJapmUVUUBeDlw?view

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.