NIFI-16206 connector toggle to handle "true"/"false" strings as booleans - #11546
Conversation
|
Reviewing... |
|
The mechanism is correctly diagnosed and the fix lands in the right places. All gates pass locally (897 shared tests, lint, build). One blocking item, three should-fixes, and some nits. Blocking:
|
aaf4183 to
2b2bd52
Compare
|
Re-reviewed the updated branch. The blocking case-sensitivity issue is fixed, the leaf-module extraction is done correctly and completely, and the new Two follow-ups on the 1.
|
|
Thanks for the review @mcgilman ! I have addressed your feedback. |
mcgilman
left a comment
There was a problem hiding this comment.
Thanks for the updates @scottyaslan!
BOOLEAN properties in the Connector Configuration wizard could misdisplay and fail to update dependents when rendered as slide toggles.
Symptoms
"false"could render as checkedRoot cause
BOOLEAN values cross the wire as strings (
"true"/"false") viaConnectorValueReferenceand property defaults.MatSlideTogglecoerces with!!value, so the string"false"is truthy. Separately,dependsOn.dependentValuesisstring[]from the API while the live form value is a nativeboolean;Array.prototype.includesuses strict equality, sotruedoes not match"true".Fix
toBooleanValueat form init, CVAwriteValue, andfromValueReferenceisDependencyValueSatisfiedwithString(value)coercion for step dependencies, property dependencies, and validation visibility"false"is not treated as changedJira
https://issues.apache.org/jira/browse/NIFI-16206
Testing
libs/sharedfor value-reference coercion, dependency matching, configuration-step BOOLEAN visibility, and dirty-deltadependsOn— default/saved"false"renders unchecked; toggle on/off updates dependents; navigate away/back and reopen stays consistent; changing an unrelated field does not send an untouched BOOLEAN as changed