carvel-dev / ytt

YAML templating tool that works on YAML structure instead of text
https://carvel.dev/ytt
Apache License 2.0
1.66k stars 135 forks source link

Provide a way to either render output to stderr and/or include custom output to `--debug` #497

Open pivotaljohn opened 2 years ago

pivotaljohn commented 2 years ago

Describe the problem/challenge you have Something blows up in some Starlark code in my template; but it's hard to get to the root cause because I can't see the values of expressions at runtime.

Describe the solution you'd like The ability to include trace output during a ytt run. Even better if I could leave such tracing and be able to toggle it on and off from the command-line (e.g. include in --debug or introduce a flag --trace)

Anything else you would like to add: The current workaround is to use assert.fail() in spots close to where the error occurs and include the desired context that way.

This idea has come up multiple times (in fact, hard to believe there isn't already an issue about this). Most recently in this Slack conversation: https://kubernetes.slack.com/archives/CH8KCCKA5/p1632938666479600

To do:


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.

jayunit100 commented 2 years ago

yup ! pleeeaseeeeee