Frontend: only send modified inputs in Pipeline New mutation

Overview

We need to modify the PipelineInputsForm component to behave differently when used in the Pipeline New Form vs. Pipeline Schedules Form. In the Pipeline New Form, it should only emit modified inputs, while in the Pipeline Schedules Form, it should continue to emit all inputs.

Implementation Steps

  1. Add a boolean prop to pipeline_inputs_form.vue
  • Add emitModifiedOnly: { type: Boolean, required: false, default: false }
  • This prop will control whether to emit all inputs (default behavior) or only modified inputs
  1. Update pipeline_new_form.vue to use the new prop
  • Add emit-modified-only to the <pipeline-inputs-form> component props
  • The Pipeline Schedules Form doesn't need changes as it will use the default value
  1. Refactor the input emission logic
  • Update file to emit some or all inputs based on this.emitModifiedOnly
  1. Update tests

Definition of "Modified Input"

For clarity, a "modified input" is any input whose current value differs from the original default value in the CI/CD configuration, regardless of whether that modification came from user interaction or from loaded saved values.

Technical Notes

  • The current implementation emits all inputs regardless of whether they've been modified
  • This change allows components to opt into receiving only modified inputs when needed
  • No changes needed to the Pipeline Schedules Form as it will continue using the default behavior
Edited by Briley Sandlin