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

ytt has too steep of a learning curve #728

Open
rit001 opened this issue Aug 30, 2022 · 6 comments
Open

ytt has too steep of a learning curve #728

rit001 opened this issue Aug 30, 2022 · 6 comments
Labels
bug This issue describes a defect or unexpected behavior documentation This issue indicates a change to the docs should be considered surprising to users

Comments

@rit001
Copy link

rit001 commented Aug 30, 2022

ytt seems to support a lot of advanced features that I could use in the future, but today I just need to pull some basic files into the output stream and so am looking for a simple import feature.

Thanks

Roger

@rit001 rit001 added the carvel triage This issue has not yet been triaged for relevance label Aug 30, 2022
@pivotaljohn
Copy link
Contributor

Hey Roger!

Apologies for the long delay in answering your question.

Yes, ytt gives you the ability to load the contents of a text file into a template.

However, before I jump to a specific solution, it would be prudent to make sure we understand your needs.

Can you provide a simple example of what it is that you're trying to accomplish here?

@pivotaljohn pivotaljohn added helping with an issue Debugging happening to identify the problem and removed carvel triage This issue has not yet been triaged for relevance labels Sep 7, 2022
@rit001
Copy link
Author

rit001 commented Sep 7, 2022

Hi, thanks for the reply.

I was looking for a way to just 'include' the contents of one yml file into another one. The aim was to start off with a very simple solution and then use more of ytt's features over time - having read the docs a good few times I have to say that it has something of a steep learning curve, with just about every example laid out for someone who already understands what is going on.

In the end, I used a different solution, but I do at least know that ytt exists as and when I need to do any major yml work.

@pivotaljohn
Copy link
Contributor

The aim was to start off with a very simple solution and then use more of ytt's features over time - having read the docs a good few times I have to say that it has something of a steep learning curve, with just about every example laid out for someone who already understands what is going on.

Thank you for taking the time to give us this feedback. 🙏🏻

It's not you, we've heard this critique from many folk. We have an initiative we hope to prioritize soon to rework the whole experience of getting started with the tool. The revised experience would be more gradual, introducing each essential concept, one at a time ... and be use case-based.

We're grateful for the signal you've left here; if you have the gumption for it, we'd be delighted to hear anything you can share about your use case (not just the problem you were solving, here; but your wider needs in this area).

@pivotaljohn pivotaljohn added bug This issue describes a defect or unexpected behavior surprising to users documentation This issue indicates a change to the docs should be considered and removed helping with an issue Debugging happening to identify the problem labels Sep 7, 2022
@pivotaljohn pivotaljohn changed the title Does ytt support the idea of just importing a text file. ytt has too steep of a learning curve Sep 7, 2022
@rit001
Copy link
Author

rit001 commented Sep 7, 2022

The user case was rather simple.

I had a shell script that built a yml file by combining a number of different files - each logical config was just a set of files in a different directory. My first 'plan' was to find a simple way to just combine yml files by processing a yml file - much like the c programming language uses #include "something" within one file to pull in the text held in another file.

The logic was that by using a very basic #include type command I would be able to remove the shell script and instead start the process of using more advanced yml tools over time. I ended up trying to use ytt functions and the result was more complicated and less easy to understand than just using the shell script :(

In the end, I just went with a far more static yml file in each of the different config directories, with a small amount of ansible scripting, it reduced the complexity of the shell script without introducing the complexity of ytt.

The issue with ytt at the moment from my point of view is not that I can not invest the time to learn and use it, but rather whatever I put together has to be readable by whoever covers for me when I go on holiday or walk under a bus. At the moment a yml file using a range of ytt features would be just about unreadable to anyone who has not spent a lot of time learning ytt, which is something of a problem as the supporting docs are not currently aimed at such people and so they would be unable to get up to speed.

@pivotaljohn
Copy link
Contributor

This is very helpful, Roger. Thank you for taking the time to articulate your experience.

This really stuck out for me:

The issue with ytt at the moment from my point of view is not that I can not invest the time to learn and use it, but rather whatever I put together has to be readable by whoever covers for me when I go on holiday or walk under a bus.

I'm more proud of producing a solution that decreases the cost of maintenance; this is deeply personally motivating.

@m0un10
Copy link

m0un10 commented Jan 31, 2023

I just have to say, it's great to see this discussion. I also had wondered, why do I need to write a bash script to make it usable by casual users? If you can solve that, this thing really takes off. There is however an alternative to includes. The strategy I have taken for every project that I've used YTT for is to go with file and directory conventions. You put files in a specific place and it "just works", thanks in large part to my bash script that has some logic (it doesn't simply wrap "-f" args). I considered to open source it as an opinionated reference implementation (and still might) but honestly it would be way better if this got built in as a mode for ytt.

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 documentation This issue indicates a change to the docs should be considered surprising to users
Projects
Status: To Triage
Development

No branches or pull requests

3 participants