Bug 1368917 - It's better to remove blank env name/value when BC has no env vars defined
Summary: It's better to remove blank env name/value when BC has no env vars defined
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: bpeterse
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-22 06:13 UTC by Yadan Pei
Modified: 2016-09-19 13:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 13:54:26 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yadan Pei 2016-08-22 06:13:52 UTC
Description of problem:
When saving buildconfig changes, validation checking on blank env name/value will fail, this will block us from save updates successfully, it's better to remove blank env name/value row, user could click "Add environment variable" to add

Version-Release number of selected component (if applicable):
openshift v1.3.0-alpha.3+7b3e38d
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1.Create a ruby app without environment variables
$ oc new-build openshift/ruby:latest --code=http://github.com/openshift/ruby-hello-world.git
2.Access BuildConfig edit page
3.Didn't change anything, only update Run Policy from 'Serial' to 'Serial latest only'

Actual results:
3. It will give error info:
< An error occurred updating the build ruby-hello-worldBuild ConfigBuildConfig "ruby-hello-world" is invalid: spec.strategy.sourceStrategy.env[0].name: Required value >
Changes could not be saved correctly, you have to delete the blank env name/value row to save the changes

Expected results:
3. It's better to remove the blank env name/value when BC has no environment variables, user could click "Add environment variable" to add. 

Additional info:

Comment 1 Yadan Pei 2016-08-22 06:18:45 UTC
This is general issue for key-value-editor

Comment 2 Jessica Forrester 2016-08-22 12:20:35 UTC
We chose to have the blank row there for ease of adding your first key/value pair.  The real issue is that a completely blank row should not block form validation in the BC GUI editor, Route editor / creator, or create from image / template.  Ben please check any of the forms using the KVE other than the Enivronment tabs.

Comment 3 bpeterse 2016-08-22 13:35:04 UTC
Will do.

Comment 4 bpeterse 2016-08-22 20:34:14 UTC
PR merged that should fix this: https://github.com/openshift/origin-web-console/pull/445

Comment 5 Jessica Forrester 2016-08-22 23:02:32 UTC
and in origin in https://github.com/openshift/origin/pull/10580

Comment 6 Yadan Pei 2016-08-23 03:04:28 UTC
Checked against latest origin-web-console(manually vendor into origin since origin PR is not merged yet)

On edit/builds page, blank key-value-edtior will not block saving other changes.


Move to VERIFIED


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