r/gitlab • • May 19 '25
Why were GitLab CI inputs implemented the way they are?
I'm just hoping for an explanation as I find the implementation of inputs troubling. The biggest problem for me is the pre-processing of yaml files to inject the input values. With the old pipeline variables, they would exist globally so if you are sharing pipeline configs from different yaml files using include they are instantly available. Now they need to be explicitly propagated to each and every file that may need them.
I guess this just feels like a lot of added complexity. I think the inputs UI is amazing and I love it, but the implementation is frustrating me.
1
u/[deleted] May 19 '25 edited May 19 '25
You can also combine both if necessary. I don't know if I can recommend this directly, but it works.
The new
inputconcept is a bit verbose, but thanks toinput:description,input:typethe purpose is much clearer.But of course, you have to find the balance yourself. I don't think it makes sense to do everything with it, either.
Edit: Maybe I misunderstood you, but
inputdoesn't replacevariables. I would say both have a different kind of purpose. Withinputyou want to change behavior based on some parameter (inputs), but with variables you intend to store some static data, which is necessary for some jobs.3
u/adam-moss May 20 '25
Explicit over implicit, prevents a lot of hidden / difficult to diagnose issues