Bug 1843239 - Create Operand form: Knative Serving - Integer field erroneously allows char (should map to "number" widget)
Summary: Create Operand form: Knative Serving - Integer field erroneously allows char ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard:
: 1843242 (view as bug list)
Depends On:
Blocks: 1847283
TreeView+ depends on / blocked
 
Reported: 2020-06-02 20:54 UTC by tony.wu
Modified: 2020-10-27 16:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Manifested, discoverd, and fixed before release.
Clone Of:
: 1847283 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:04:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
1_KnativeServing_form.png (249.39 KB, image/png)
2020-06-02 20:54 UTC, tony.wu
no flags Details
special-char (81.54 KB, image/png)
2020-06-04 10:51 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 5665 0 None closed Bug 1843239: Fix number widget detection in operand form 2020-08-25 00:33:37 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:04:24 UTC

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


Note You need to log in before you can comment on or make changes to this bug.