carvel-dev / carvel-dev/ytt

ytt version check should run before data values

Open
#159 1 comment 0 reactions 0 assignees View on GitHub
discussion enhancement
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

When a configuration author uses a new data/values feature in their templates,
and they include a version check assertion,
and the configuration consumer is using an earlier version of `ytt`

we expect `ytt` to report a minimum version error:
```
ytt version '0.27.0' does not meet the minimum required version '0.28.0'
```

instead, users see an error:

> Was having issues templating the manifest with `ytt` [...]. Had the following error:
>
> ```ytt: Error: Overlaying data values (in following order: values.yml, load-balancer.yml, system-registry-values.yml, values.yml): Document on line values.yml:3: Map item (key 'system_domain') on line values.yml:4: Expected number of matched nodes to be 1, but was 0```
>
> the fix was to upgrade `ytt` to 0.28, which supports the `library/ref` thing

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the version-check assertion and the data-values processing path, then verify behavior with a configuration using a newer data/values feature on an older ytt version. Done means the minimum-version error is reported before data-values processing errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, devops
Issue type
Bug
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.