Bug 1633285 - No secrets dropdown in buildconfig edit page if any of the secrets has no data
Summary: No secrets dropdown in buildconfig edit page if any of the secrets has no data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.9.z
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1656657 1656660
TreeView+ depends on / blocked
 
Reported: 2018-09-26 15:19 UTC by Sergio G.
Modified: 2019-01-24 16:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Accessing undefined key on the secrets object. Consequence: Javascript runtime error caused by accessing undefined key on the object. Fix: Using lodash _.get() method which wont error out if accessing undefined key on the secrets object. Result: The secrets dropdown is visible event if there is secret without any data
Clone Of:
: 1656657 1656659 1656660 1656661 (view as bug list)
Environment:
Last Closed: 2018-12-13 19:27:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
Screenshot where the dropdown is missing (33.88 KB, image/png)
2018-09-26 15:19 UTC, Sergio G.
no flags Details
Javascript error in the browser console (61.43 KB, image/png)
2018-09-26 15:20 UTC, Sergio G.
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3748 None None None 2018-12-13 19:27:15 UTC

Description Sergio G. 2018-09-26 15:19:59 UTC
Created attachment 1487301 [details]
Screenshot where the dropdown is missing

Description of problem:
When editing a buildConfig using the UI, there's no secrets dropdown under some circumstances.

Version-Release number of selected component (if applicable):
3.7  - not affected
3.9  - affected
3.10 - affected

How reproducible:
Always

Steps to Reproduce:
$ oc new-project sgarcia-test1
$ oc new-app https://github.com/openshift/nodejs-ex.git
$ cat >secret.yaml <<EOF
apiVersion: v1
data:
kind: Secret
metadata:
  name: my-secret
type: Opaque
EOF
$ oc create -f secret.yaml

Actual results:
Can't see the secrets dropdown (attachment 1 [details]) and there's an error in the developer console appears (attachment 2 [details]).

Expected results:
See the secrets dropdown

Comment 1 Sergio G. 2018-09-26 15:20:50 UTC
Created attachment 1487302 [details]
Javascript error in the browser console

Comment 6 Yanping Zhang 2018-11-29 03:35:04 UTC
Checked on OCP 3.9 env and 3.10 env with version:
--------------------------
openshift v3.9.55
kubernetes v1.9.1+a0ce1bc657
--------------------------
openshift v3.10.79
kubernetes v1.10.0+b81c8f8
--------------------------

Steps to test:
1. Create app in project:
# oc new-app https://github.com/openshift/nodejs-ex.git
2. Create secret in project:
$ cat >secret.yaml <<EOF
apiVersion: v1
data:
kind: Secret
metadata:
  name: my-secret
type: Opaque
EOF
$ oc create -f secret.yaml
3. Check on bc edit page, there is secret dropdown list under each type of secret, eg, "Source Secret", "Pull Secret", "Push Secret", "Build Secret".

The bug has been fixed on OCP 3.9 and OCP 3.10.

Comment 10 Yadan Pei 2018-12-06 02:12:46 UTC
Move to VERIFIED per comment 6 and comment 9

Comment 12 errata-xmlrpc 2018-12-13 19:27:05 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, 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:3748

Comment 13 openshift-github-bot 2019-01-24 16:16:41 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/e2ba330ef0dd3fe227367509798ef0ab7f5ad368
Bug 1633285 - No secrets dropdown in buildconfig edit page if any of the secrets has no data

https://github.com/openshift/origin-web-console/commit/4534d447667d928ed08b8eed3ce7b1a450d9a2d8
Merge pull request #3083 from jhadvig/BZ1633285-master

Bug 1633285 - No secrets dropdown in buildconfig edit page if any of the secrets has no data


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