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 · 7 comments
Open

ytt has too steep of a learning curve #728

rit001 opened this issue Aug 30, 2022 · 7 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
@carvel-bot carvel-bot moved this to To Triage in Carvel 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
@pivotaljohn pivotaljohn moved this from To Triage to In Progress in Carvel 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
@pivotaljohn pivotaljohn moved this from In Progress to Unprioritized in Carvel 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.

@github-project-automation github-project-automation bot moved this to To Triage in Carvel Feb 14, 2023
@iuliancristea
Copy link

Hello,

It’s been about a year and a half since the last update to this issue and wanted to ask whether this was still on the radar. I’m not saying that there hasn’t been anything done since the initial discussion (most probably there has been), but as someone who has started using YTT in production recently, I cannot say that a newcomer can hit the ground running with YTT.

I believe there’s another open issue about this, but what would help immensely here would be a ytt plugin for common IDEs with linting, auto-completion and/or suggestions etc. Learning to use ytt should never be harder than learning a fully featured programming language until (arguably) one reaches very specific niche situations.

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

4 participants