Follow-up from "Fix bug with resolving values and feature flag"
Currently, when pipeline inputs are submitted via the web form with empty values, the frontend sends value: "" (empty string) rather than null or omitting the field. We handle this in the input validation layer Ci::Inputs::BaseInput by converting empty strings to nil for rules-based inputs:
param = nil if param.is_a?(String) && param.empty? && rules
this leaks form submission details into the validation layer.
The following discussion from !213358 (merged) should be addressed:
-
@avielle started a discussion: (+4 comments) From what I can tell, we're still changing existing behavior here. Currently this is valid:
spec: inputs: test_input: default: ""With this change
default: ""will no longer be valid. Is there a reason that we need empty string values to be invalid when usingrules?