Improve template variable overrides
long-term
P
Prospective Walrus
We have an account-level pipeline template used by many repos.
That pipeline template is composed of multiple step group templates (for example: curate inputs, initialize pipeline, centralized selector, pants/native test/build groups, GraphQL groups).
Consumer repos define a linked pipeline.yaml and pass templateInputs.variables only for values they explicitly want to override.
Our goal is:
Keep consumer pipeline.yaml files lean (only intentional overrides).
Let template defaults apply when variables are omitted.
Still allow per-pipeline overrides later by adding a variable in the consumer pipeline.
Avoid reconciliation repeatedly adding/injecting many defaulted fields into consumer YAML.
What we observed in testing:
If template variable is fixed literal:
Omit from consumer: works (template default applies).
Add in consumer as override: not allowed / reconciled away (expected, since not an input contract).
If template variable is set with <+input>.default(...).executionInput():
Override works.
But reconciliation materializes those runtime-input fields in linked pipelines, which makes consumer YAML less lean.
We are looking for a better way to override these template variables without having to constantly reconcile the entities calling the templates.

Akshit Madan
updated the status to
long-term
P
Prospective Walrus
Additional context:
With large, golden templates, we naturally have many different pipeline-level variables that we want to use to have a standard place to update values which we pass to step group templates inside of our pipeline templates.
We want to make these variable, as they are the levers which we, as a platform team, want to use to control the behavior of the pipeline. In addition, these are things which SHOULD be variable, in that there may be cases where we want to allow for explicit overrides.
In almost all other forms of programming you would just have this as a function with sets of default parameters which can be overridden with arguments to calls to said function. This is not how things work today in Harness, and it essentially requires the user to specify every single pipeline variable inside of their pipeline.yaml even if they are just using the default value due to how reconciliation functions today.
To me this feels like a bug or at least a very poor user experience in pipeline definition/interaction. End users should be able to have lean pipeline definitions with the ability to override things if needed.
And with the current implementation, we are looking at ways to implement something with our desired behavior, which would involve side-stepping Harness-native configuration/variable definition in favor of our own pipeline configuration file which we parse inside of our own steps. This isn't something we feel like we should have to do, but adding a new pipeline variable which has a reasonable default shouldn't result in reconciliation needs for hundreds of pipelines when the pipeline variable they are just adding is specifying a default value.