Bug 1421097

Summary: Link "Create New Secret" is not shown on BC edit page when accessed by direct url
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jforrest, jokerman, mmccomas, tdawson, xiaocwan, yanpzhan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-08 13:21:35 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:

Description Xingxing Xia 2017-02-10 10:42:13 UTC
Description of problem:
Link "Create New Secret" is not shown on BC edit page when accessed by direct url. DC edit page has no this problem

Version-Release number of selected component (if applicable):
openshift v3.5.0.18

How reproducible:
Always

Steps to Reproduce:
1. Create BC
$ oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

2. Come to BC edit page by accessing direct url: "https://<master:port>/console/project/xxia-test/edit/builds/ruby-ex"

3. Click "Show advanced options", check link "Create New Secret" under parts "Pull Secret", "Push Secret"

4. As comparison, come to BC edit page by: on overview page, click Builds --> Builds --> ruby-ex --> Actions --> Edit
Then check step 3 again

Actual results:
2. Link "Create New Secret" is NOT shown under "Pull Secret", "Push Secret"
4. Link is shown

Expected results:
2. Link should be shown as step 4

Additional info:

Comment 1 Jessica Forrester 2017-02-21 21:16:25 UTC
Fixed for enterprise 3.5 in https://github.com/openshift/origin-web-console/pull/1281

Fixed for master in https://github.com/openshift/origin-web-console/pull/1280

Comment 2 Troy Dawson 2017-02-24 20:38:11 UTC
This has been merged into ocp and is in OCP v3.5.0.34 or newer.

Comment 4 Yanping Zhang 2017-02-27 02:30:28 UTC
Checked on openshift v3.5.0.34
Steps to test:
1. Create BC
$ oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

2. Come to BC edit page by accessing direct url: "https://<master:port>/console/project/xxia-test/edit/builds/ruby-ex"

3. Click "Show advanced options", check link "Create New Secret" under parts "Source Secret", "Pull Secret", "Push Secret", "Build Secret"

4. As comparison, come to BC edit page by: on overview page, click Builds --> Builds --> ruby-ex --> Actions --> Edit

Actual restults:
3. There is link "Create New Secret" under "Source Secret", but still no "Create New Secret" under "Pull Secret", "Push Secret", "Build Secret".
4. Link is shown under all parts.

From the result of step 3, the issue is still reproduced, so assign it back.

Comment 5 Samuel Padgett 2017-02-27 13:03:14 UTC
The linked pull request was a fix for a different page (add to project).

Comment 6 Jessica Forrester 2017-02-27 13:30:39 UTC
OK the remaining issue can probably just go into 3.6 at this point

Comment 7 Samuel Padgett 2017-02-27 14:36:37 UTC
There is also a runtime error in the console.

TypeError: Cannot read property 'secret' of undefined
    at Scope.$scope.canAddSourceSecret (oscSourceSecrets.js:26)
    at fn (eval at compile (angular.js:15126), <anonymous>:4:245)
    at Scope.$digest (angular.js:17828)
    at Scope.$apply (angular.js:18102)
    at done (angular.js:12082)
    at completeRequest (angular.js:12291)
    at XMLHttpRequest.requestLoaded (angular.js:12219)

Comment 8 openshift-github-bot 2017-02-27 15:25:13 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/95a277843519a026ca207140f3bfd2624e0f454b
Bug  1421097 - Fix problems with secret links on build config page

* Fix missing "Create Secret" link if the page is accessed directly by URL
* Fix runtime error in `canAddSourceSecret`

https://bugzilla.redhat.com/show_bug.cgi?id=1421097

Comment 9 Samuel Padgett 2017-02-28 14:14:41 UTC
enterprise-3.5 PR: https://github.com/openshift/origin-web-console/pull/1305

Comment 10 Troy Dawson 2017-03-01 22:57:16 UTC
This has been merged into ocp and is in OCP v3.5.0.37 or newer.

Comment 11 Yanping Zhang 2017-03-02 10:02:21 UTC
Tested on OCP v3.5.0.37

Checked on external bc edit page, there are links "Create New Secret" under "Source Secret", "Pull Secret", "Push Secret", but still lack a link "Create New Secret" under "Build Secret". Pls have a check, thx!

In the console, there is no runtime error in `canAddSourceSecret` now. This issue is fixed.

Comment 12 Samuel Padgett 2017-03-02 13:00:47 UTC
(In reply to Yanping Zhang from comment #11)
> Tested on OCP v3.5.0.37
> 
> Checked on external bc edit page, there are links "Create New Secret" under
> "Source Secret", "Pull Secret", "Push Secret", but still lack a link "Create
> New Secret" under "Build Secret". Pls have a check, thx!
> 
> In the console, there is no runtime error in `canAddSourceSecret` now. This
> issue is fixed.

Fixes for the for the follow-on issue:

master https://github.com/openshift/origin-web-console/pull/1317
enterprise-3.5 https://github.com/openshift/origin-web-console/pull/1318

Comment 14 Troy Dawson 2017-03-03 17:55:52 UTC
This has been merged into ocp and is in OCP v3.5.0.38 or newer.

Comment 15 XiaochuanWang 2017-03-07 01:53:06 UTC
"Create New Secret" displays under "Pull Secret" and under "Push Secret" individually and correctly.

Verified on Openshift v3.5.0.40