Closed cari-lynn closed 2 years ago
It's also not possible to read from the root directory in data.read("/") in a data values file only. It is still able to read from the same directory. I believe its caused by the same thing as this bug. Heres my reproduction example.
Is there an incoming reason for closing this issue?
Ah! I thought that this issue was linked with it's PR (it is in ZenHub, but not GitHub).
It's been fixed, sir.
We're looking at cutting the next version soon!
What steps did you take: When
data.list("/")
within a data values file, it should list the files relative to the root library. Playground reproduction example: https://carvel.dev/ytt/#gist:https://gist.github.com/cari-lynn/8b7c194fd28bcab0ec80e716eecc161fWhat happened: It will list no files at all.
What did you expect: I expect that
data.list("/")
will list all files relative to the root libraryAnything else you would like to add:
data.list("")
without the/
will list files relative to the current directory just as expected. This problem just shows up when using the/
.I believe this happens because we don't pass down the root library during data values pre processing. But I believe this could be changed.
https://github.com/vmware-tanzu/carvel-ytt/blob/develop/pkg/workspace/data_values_pre_processing.go#L119-L121
ytt Docs
originating Slack thread in #carvel
Environment:
ytt --version
): v0.40.1/etc/os-release
):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.