Fix: Preserve user input in dynamic inputs without options

What does this MR do and why?

Fixes an issue where user input was being reset for dynamic inputs that use spec:inputs:rules without defining options. Previously, when a rule matched but had no options array, the validation logic incorrectly treated any user-entered value as invalid and reset it.

#584868 (closed)

How to set up and validate locally

  1. Create a CI config with dynamic inputs using rules without options:

    spec:
      inputs:
        deployment_type:
          options: ['standard', 'custom']
          default: 'standard'
        custom_config:
          rules:
            - if: $[[ inputs.deployment_type ]] == 'custom'
              default: null
  2. Run a new pipeline and select custom for deployment_type

  3. Enter text in custom_config - it should now be preserved

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Laura Montemayor

Merge request reports

Loading