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

"null" data values erroneously passes schema check #566

Open
pivotaljohn opened this issue Dec 15, 2021 · 1 comment
Open

"null" data values erroneously passes schema check #566

pivotaljohn opened this issue Dec 15, 2021 · 1 comment
Labels
breaking change bug This issue describes a defect or unexpected behavior priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.

Comments

@pivotaljohn
Copy link
Contributor

What steps did you take:

With these files...

#@data/values-schema
---
gotta_have_this_key: true
#@data/values
---
#@ load("@ytt:data", "data")
---
data.values: #@ data.values

.. ran this ...

$ ytt -f .

What happened:

data.values: null

What did you expect:
I expected to see a schema error message, like...

ytt: Error: Overlaying data values (in following order: values.yml):
One or more data values were invalid
====================================

values.yml:
    |
  2 | ---
    |

    = found: null
    = expected: map (by schema.yml:2)

Anything else you would like to add:

Environment:

  • ytt version (use ytt --version): v0.38.0

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.

@pivotaljohn pivotaljohn added the bug This issue describes a defect or unexpected behavior label Dec 15, 2021
@aaronshurley aaronshurley moved this to To Triage in Carvel Aug 18, 2022
@pivotaljohn
Copy link
Contributor Author

Fixing this bug takes a behavior that was succeeding and now causes an error. This is technically a breaking change.

That said, relying on this behavior has the effect of creating a false positive. Breaks that occur from this fix will reveal potential issues that had not yet surfaced (or created enough damage to be noticed).

@pivotaljohn pivotaljohn moved this from To Triage to Unprioritized in Carvel Sep 27, 2022
@pivotaljohn pivotaljohn added the priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome. label Sep 27, 2022
@github-project-automation github-project-automation bot moved this to To Triage in Carvel Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bug This issue describes a defect or unexpected behavior priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.
Projects
Status: To Triage
Development

No branches or pull requests

1 participant