Open pn-santos opened 4 years ago
ytt has several "special" functions that need to integrate deeper into structure building stack (vs regular functions that just return structures). template.replace is one of them. will dig in further to see whats going on.
...10 months later...
While we haven't seen others run into this issue, this falls under the category of "you're using the tool well, it's just a sufficiently advanced case that the current implementation didn't account for it."
This bug is relevant to ytt
— we'd like for authors to be able to template.replace()
from another module. If a contributor debugged this issue and fixed it, we would definitely accept that contribution.
That said, given the current set of priorities, the Carvel maintainers cannot commit to picking up this work, today.
As @cppforlife indicated above, this issue requires a more in-depth review to determine an approach.
That would likely result in a design discussion. It indicate that this is in a kind of "research" state, labeling this way and moving to "Carvel Accepted" pipeline.
We're going to move this to the Unprioritized Backlog for now. We're open to contributions but there will likely need to be some design discussions first. Please let us know if you'd be interested in contributing to this work.
Not sure if I'm attempting to do something that is not supposed to work but here goes:
With this:
where
job.config
is bound todefault_config
:It works as expected.
However if I try to move the
t.replace
to the function in thejob
module:where
job.config
is bound todefault_config
:then I get a panic:
Am I trying to do something that isn't supposed to work or is this a bug?