Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1843239

Summary: Create Operand form: Knative Serving - Integer field erroneously allows char (should map to "number" widget)
Product: OpenShift Container Platform Reporter: tony.wu
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, pweil, spadgett, yanpzhan
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Manifested, discoverd, and fixed before release.
Story Points: ---
Clone Of:
: 1847283 (view as bug list) Environment:
Last Closed: 2020-10-27 16:04:21 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1847283    
Attachments:
Description Flags
1_KnativeServing_form.png
none
special-char none

Description tony.wu 2020-06-02 20:54:00 UTC
Created attachment 1694570 [details]
1_KnativeServing_form.png

Description of problem:
Create Operand form: Knative Serving - Integer field erroneously allows char (should map to "number" widget)

See attached screenshots.

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

How reproducible:
100%

Steps to Reproduce:
1. Install OpenShift Serverless Operator from "OperatorHub" view
2. Go to "Installed Operators" view and create "Knative Serving" instance
3. Find "High Availability --> replicas" field, type in char

Actual results:
Chars are allowed

Expected results:
Should only accept integer

Additional info:

Comment 1 Paul Weil 2020-06-03 13:33:04 UTC
*** Bug 1843242 has been marked as a duplicate of this bug. ***

Comment 6 Yanping Zhang 2020-06-04 10:50:46 UTC
Checked on ocp 4.6 cluster with payload 4.6.0-0.ci-2020-06-04-011434.
1. Install OpenShift Serverless Operator from "OperatorHub" view
2. Go to "Installed Operators" view and create "Knative Serving" instance
3. Find "High Availability --> replicas" field, type in char, eg: abc, could not succeed. 
Could type in number. Type in "--1--2--3--4.5-6", click "Create". Will succeed, and check the instance yaml, the replicas is set 2:
  high-availability:
    replicas: 2

It's better not allow input "-",".".

Comment 7 Yanping Zhang 2020-06-04 10:51:31 UTC
Created attachment 1695019 [details]
special-char

Comment 8 Jon Jackson 2020-06-08 14:51:05 UTC
This is working as expected. The HTML number input element allows the characters '+-.,e', which matches the behavior of previous releases. I would have to dig further into why step 3 in Comment 6 seems to be resulting in an incorrectly parsed value for High Availability replicas, but I think that might be a separate bug with the way number fields are parsed.

Comment 9 Jon Jackson 2020-06-10 14:17:19 UTC
I've been trying to reproduce the issue where an incorrect number is parsed from an invalid string in a number field. I can't seem to reproduce. I entered the exact same string you used in Comment 6 on multiple different forms with number fields. After creating the instance, the resulting resource did not have any value defined on the corresponding property. Feel free to open another bug if you are able to reproduce the issue again.

Comment 10 XiaochuanWang 2020-06-22 07:08:47 UTC
The original issue could be reproduced. I input "test" in "replicas" field and it created successfully, the replicas is automatically set to 2.
Checked on 4.6.0-0.nightly-2020-06-20-011219

Comment 11 Jon Jackson 2020-07-02 19:20:51 UTC
Cannot reproduce in latest. Can we check this again. Maybe the release we checked didn't have my fix for some reason.

Comment 12 Samuel Padgett 2020-07-02 19:57:09 UTC
Could this be browser specific? What browser are you using xiaocwan ?

Comment 13 Yanping Zhang 2020-07-06 10:18:26 UTC
Checked on 4.6 cluster with payload 4.6.0-0.nightly-2020-07-05-192128.
The result is the same with that in Comment 6. I will check again if I need open another bug.
The issue for current bug has been fixed, so move it to Verified for now.

Comment 15 errata-xmlrpc 2020-10-27 16:04:21 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.6 GA Images), 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-2020:4196