Bug 1551991
| Summary: | Should not allow update bc env from configmap/secret without update key | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yanping Zhang <yanpzhan> | ||||
| Component: | Management Console | Assignee: | Samuel Padgett <spadgett> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 3.9.0 | CC: | aos-bugs, jokerman, mmccomas, yapei | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.9.z | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||
| Doc Text: |
undefined
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-08-09 22:13:46 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: | |||||||
| Attachments: |
|
||||||
Commits pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/0b38b75f3d8258cb88c4564846b9954fd9abc44e Bug 1551991 - Make env name required when valueFrom item selected Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1551991 https://github.com/openshift/origin-web-console/commit/0051b1fbb88133b5c441fc5b36c53ad6435c3150 Merge pull request #2873 from spadgett/key-required-value-from Automatic merge from submit-queue. Bug 1551991 - Make env name required when valueFrom item selected Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1551991 /assign @rhamilto Build env updates recording: http://recordit.co/yH7gbrzOm3 Deployment env updates recording: http://recordit.co/JkmezX46Y2 We could see when changing configmap name without re-selecting keys referenced, it will throw error for deployment, but didn't give error message for builds. Today checked on v3.9.4(already includes the fix PR #2876) [yapei@dhcp-140-3 origin-web-console-server]$ git log --pretty="%h %cd - %s (%an)" --date=local atomic-openshift-web-console-3.9.4-1 -1 8f043688 Fri Mar 9 06:27:23 2018 - bump origin-web-console 026c62a (Justin Pierce) [yapei@dhcp-140-3 origin-web-console]$ git log --pretty="%h %cd - %s" 026c62a | grep '#2876' a27297d0 Tue Mar 6 07:46:41 2018 -0800 - Merge pull request #2876 from openshift-cherrypick-robot/cherry-pick-2873-to-enterprise-3.9 The issue reported still exists. The fix in #2876 ensures we must set env name when valueFrom is selected, but it's a different issue. Ah, I only fixed the bug where you could select a config map without typing in the env var name. I see now there's a second problem. Follow up fix: https://github.com/openshift/origin-web-console/pull/2888 Commits pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/26b69690d05d22e70eb6226850a260d7e9e0077b Bug 1551991 - Correctly clear key when another valueFrom resource selected In our key/value editor, correctly clear the valueFrom key when a different resource reference is selected. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1551991 https://github.com/openshift/origin-web-console/commit/41f70ae4eed8ca12fb88ad20effeb823d90053e8 Merge pull request #2888 from spadgett/bc-value-from-no-key Automatic merge from submit-queue. Bug 1551991 - Correctly clear key when another valueFrom resource selected In our key/value editor, correctly clear the valueFrom key when a different resource reference is selected. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1551991 /assign @benjaminapetersen Changes have merged to the master branch. 3.9.z fix: https://github.com/openshift/origin-web-console/pull/2889 Fixes has been merged in v3.9.27 1. Create two configmaps, configmap1 and configmap2 2. Add one key of configmap1 as build env 3. Update build env and select a different resource configmap/configmap2, it will clear keys info, user has to re-select keys in configmap/configmap2 to save the changes. This is working as expected QE could verify when move to ON_QA According to Comment 11, the bug has been fixed, move it to Verified. 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, 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-2018:2335 |
Created attachment 1404719 [details] update-env Description of problem: Add env on bc env tab using "Add Value from Config Map or Secret", select the first configmap and select key, after save successfully, update the env, in the "Select a resource" input, change the name from first configmap to the second configmap, but don't change the key in "Select key" input. Click "Save", it save successfully. It shouldn't save successfully. Version-Release number of selected component (if applicable): v3.9.2 How reproducible: Always Steps to Reproduce: 1.Create app "phptest" from image php on web console. And create 2 configmap 2.On bc "phptest" env tab, add env by "Add Value from Config Map or Secret", choose the first configmap, select a key, click "Save". 3.Update the env, change the first configmap to the second configmap, but don't change the key, click "Save'. 4.Add other normal value again. Actual results: 2.Env was added successfully. 3.Env was update successfully. But the key part is empty. 4.The "Save' button is disabled, could not add new env now. Expected results: 3.Should forbid updating the env without update the key. Additional info: Same update action on dc env tab is forbidden, and has error info: Reason: DeploymentConfig "hello-openshift" is invalid: spec.template.spec.containers[0].env[0].valueFrom.configMapKeyRef.key: Required value