Summary
A pipeline that consumes a pipeline template should inherit the template's variable definitions and only set the values it wants to override. Today Harness expects the pipeline to repeat each variable's definition from the template, including its type, and shows a red reconciliation banner when it doesn't. The pipeline runs correctly either way. The banner should appear only when the pipeline's inputs actually conflict with the template, for example a missing required variable or a value that doesn't match the variable's type.
Background
A central platform team owns pipeline templates, and many product teams consume them. The template defines each variable once: name, type, description, required flag, and any default or allowed values. Consuming pipelines set only the values they need.
Template:
variables:
- name: REPO
type: String
required: true
value: <+input>
- name: OPTIONAL_ARGS
type: String
required: false
value: <+input>
- name: OPTIONAL_FLAG
type: String
required: false
value: <+input>.default(false).allowedValues(true,false)
Consuming pipeline:
template:
templateRef: org.my_pipeline_template
versionLabel: v1.0.0
templateInputs:
variables:
- name: REPO
value: my-repo
This pipeline runs, and the template's definitions and defaults apply to the variables it omits. Still, the console shows a red banner, "Some of the entities referenced in this pipeline have been updated.", with a Reconcile button.
Harness expects the pipeline to define every template variable again, with the same type as in the template. Reconciling adds the omitted variables, and adds
type: String
to the variables the pipeline already sets.
What we tested
  • Omitting non-required variables: the pipeline runs and the template's values apply, but the red banner shows with reconciliation error
  • Declaring every variable again in the pipeline, with
    name
    and
    value
    : the pipeline runs, but the banner still shows. Reconcile only adds
    type
    to each variable.
Expected Behaviour
  • A consuming pipeline inherits every variable definition from the template: type, description, required flag, default and allowed values.
  • The pipeline declares a variable only to override its value, with
    name
    and
    value
    only.
  • Show the reconciliation banner only when the pipeline's inputs conflict with the template, such as a missing required variable or a value that doesn't match the variable's type.
Benefits
  • Consuming pipelines stay lean and hold only real overrides.
  • A new template version which just adds/removes non-required variables does not require all pipelines to redefine the variable definitions.
  • The banner keeps its meaning: when it appears, something needs attention.
Workaround considered
  • Reconcile and save every consuming pipeline. Reconciling is a UI action that writes changes back into the pipeline YAML, which for remote pipelines means a git commit per pipeline. We manage templates and pipelines as code, so changes should flow from the repository into Harness, not from the Harness UI back into the repository.
  • Ignore the banner, which teaches users to ignore real problems too.

Photo Viewer

View photos in a modal