Bug 1966275

Summary: Start Pipeline Modal Parameters should accept empty string defaults
Product: OpenShift Container Platform Reporter: Andrew Ballantyne <aballant>
Component: Dev ConsoleAssignee: Andrew Ballantyne <aballant>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: medium Docs Contact: Rishu Mehra <rmehra>
Priority: medium    
Version: 4.6CC: aos-bugs, gamore, nmukherj, ppitonak, spathak
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the *Start Modal* did not recognize an empty string as a valid entry, so you had to enter a value. This happened even though the *Tekton Operator* recognizes empty strings as a valid "parameter default". With this update, you have the option to enter an empty string. (link:https://bugzilla.redhat.com/show_bug.cgi?id=1966275[BZ#1966275])
Story Points: ---
Clone Of: 1951043 Environment:
Last Closed: 2021-06-29 04:19:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1951043    
Bug Blocks:    
Attachments:
Description Flags
Start Pipeline Modal Parameters accept empty string defaults none

Description Andrew Ballantyne 2021-05-31 19:04:25 UTC
+++ This bug was initially created as a clone of Bug #1951043 +++

Description of problem:

The Start Pipeline Modal does not respect an empty string ('') as a valid default although it is upstream. The UI should not make it a required field in the modal.

Version-Release number of selected component (if applicable):


How reproducible:
Always (create via YAML or CLI)


Steps to Reproduce:
1. Create a Pipeline with an empty string default value (see additional info for suggestions how to do it in the UI)
2. Using the actions (or "more options" menu on the list page) select "Start Pipeline"
3. Try to submit with a empty string default param without touching the field

Actual results:
We show * next to the parameters that don't have defaults. An empty string ('') is a falsy value and thus got confused as a no default provided. This is not valid upstream and needs to change.

Expected results:
Should be able to submit without updating any params that have defaults of an empty string ('').


Additional info:
The Pipeline Builder currently doesn't support this and our UI does not allow for empty strings. Will need UX to fix that portion, but the work around would be to use the Pipeline Builder entirely and then flip over to the YAML to set the default of a param to '' and then create via YAML.

--- Additional comment from Andrew Ballantyne on 2021-04-19 13:38:26 UTC ---

Original discussion occurred on Google Chat, but I'm not sure I can link to the specific thread :(

--- Additional comment from Andrew Ballantyne on 2021-04-19 13:40:51 UTC ---

This might be the best link I can get: https://chat.google.com/room/AAAApNTFPIc/aeqy5NztVhw

Comment 3 spathak@redhat.com 2021-06-16 07:25:49 UTC
Created attachment 1791465 [details]
Start Pipeline Modal Parameters accept empty string defaults

Comment 4 spathak@redhat.com 2021-06-16 07:29:10 UTC
Verified on build version: 4.7.0-0.nightly-2021-06-12-151209
Browser: Google Chrome 89

Comment 5 OpenShift Automated Release Tooling 2021-06-17 12:29:08 UTC
OpenShift engineering has decided to not ship Red Hat OpenShift Container Platform 4.7.17 due a regression https://bugzilla.redhat.com/show_bug.cgi?id=1973006. All the fixes which were part of 4.7.17 will be now part of 4.7.18 and planned to be available in candidate channel on June 23 2021 and in fast channel on June 28th.

Comment 9 errata-xmlrpc 2021-06-29 04:19:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.7.18 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2502