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

schema/type any=True breaks schema composition #945

Open
Zebradil opened this issue Mar 4, 2025 · 0 comments
Open

schema/type any=True breaks schema composition #945

Zebradil opened this issue Mar 4, 2025 · 0 comments
Labels
bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been triaged for relevance

Comments

@Zebradil
Copy link
Member

Zebradil commented Mar 4, 2025

What steps did you take:

File: 1.schema.yaml

#@data/values-schema
---
#@schema/type any=True
something: {}

File: 2.schema.yaml

#@data/values-schema
---
something:
  #@overlay/match missing_ok=True
  list:
    - name: ""

File: values.yaml

#@data/values
---
something:
  list:
    - name: "one"
    - name: "two"

Command:

ytt -f . --data-values-inspect

What happened:

something:
  list:
  - name: ""
  - name: one
  - name: two

What did you expect:

something:
  list:
  - name: one
  - name: two

Anything else you would like to add:

For some reason, when using the schema/type any=True annotation, ytt adds an item from the additional schema to the resulting list.
Without this annotation, the result doesn't contain items from the schema, as expected.

File: 1.schema.yaml

#@data/values-schema
---
something: {}

Environment:

  • ytt version (use ytt --version): ytt version 0.51.1
  • OS (e.g. from /etc/os-release): MacOS 15.3.1

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.

@Zebradil Zebradil added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been triaged for relevance labels Mar 4, 2025
@carvel-bot carvel-bot added this to Carvel Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been triaged for relevance
Projects
Status: No status
Development

No branches or pull requests

1 participant