Bug 1391417

Summary: Required value vs. "generated if empty"
Product: OpenShift Online Reporter: Juraci Paixão Kröhling <jcosta>
Component: TemplatesAssignee: Vu Dinh <vdinh>
Status: CLOSED CURRENTRELEASE QA Contact: XiuJuan Wang <xiuwang>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: abhgupta, aos-bugs, bingli, jokerman, mmccomas, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 22:11:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Juraci Paixão Kröhling 2016-11-03 09:41:12 UTC
Description of problem:
Using the jenkins-persistent template, the field "Jenkins Password" has a "Generated if empty" hint, but that's not actually true. If empty, an error message is shown to the user.

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

How reproducible:
Always

Steps to Reproduce:
1. Select the template "jenkins-persistent"
2. Remove the value for "password"
3. Click "Create"

Actual results:
An error message is shown: https://snag.gy/0oZ4cd.jpg

Expected results:
Either the field would not claim that a value would be generated, or the error message would not be shown (and a value would indeed be generated)

Additional info:

Comment 1 Ben Parees 2016-11-03 15:16:13 UTC
I'm not observing this behavior (the field has "generated if empty" as grey text.  If if try to put an empty value into the field, the grey text stays there and a value is generated.  If i put any other value (eg " "), then that value is used.

Regardless the password parameter has been removed in the newest jenkins templates, but this logic applies to any generated parameter that also has "required" set to true.

Assigning to the web console team to investigate further but it seems like if this ever was a bug, it's fixed now.

Comment 2 Juraci Paixão Kröhling 2016-11-03 15:23:34 UTC
I just tried it again, and it still persists on https://console.preview.openshift.com .

Comment 3 Jessica Forrester 2016-11-03 17:46:44 UTC
The jenkins template specifically installed in Online is missing a field on the JENKINS_PASSWORD parameter, it needs the "from" attribute on the parameter, see

https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_examples/files/examples/v1.4/quickstart-templates/jenkins-ephemeral-template.json#L239-L245

Comment 4 Vu Dinh 2016-11-23 17:29:17 UTC
Hi,

The jenkins-persistent template in PROD cluster (console.preview) is not the newest template that we recently updated. If you want to see what the new template looks like, please visit the INT cluster at https://console.dev-preview-int.openshift.com.

However, even with the older template, I don't see any "Generated if empty" hint on the web console in PROD cluster. So, there shouldn't be any confusion there as it is required to have a valid password, not an empty one. Can you screenshot the hit that you prefer to?

Thanks,
Vu

Comment 5 Vu Dinh 2016-11-23 17:32:40 UTC
Nevermind my previous comment as I do see the hint now. Anyway, will roll-out the newly-updated templates from INT to PROD soon.

Thanks,
Vu

Comment 6 Abhishek Gupta 2016-11-23 18:18:38 UTC
This is fixed in INT and will be pushed to prod as part of the next release.

Comment 7 Bing Li 2016-11-24 04:44:34 UTC
The updated template "jenkins-persistent" works fine in INT.
Move to verified.