Bug 1652645

Summary: Webhook urls in Pipelines configuration page are invalid with "undefined" included
Product: OpenShift Container Platform Reporter: Ricardo Zanini <ricferna>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, wzheng, yanpzhan
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-30 15:10:24 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:
Description Flags
screenshot1 none

Description Ricardo Zanini 2018-11-22 14:17:27 UTC
Description of problem:
Webhook urls in "Pipelines" configuration page are invalid with "undefined" included

Version-Release number of selected component (if applicable):
openshift v3.9.30
kubernetes v1.9.1+a0ce1bc657

How reproducible:
Not Always.

Steps to Reproduce:
1. Create a newApp using a template yaml file that includes a Jenkins pipeline (see linked support ticket)
2. Create a new Webhook secret for this application (via Web Console)
3. Create a new Generic Webhook and try to associate to the web hook (via Web Console)


Actual results:

The URL in the Pipeline Configuration page adds a "undefined" tag in the URL instead of the actual secret.

The webhook urls look like:
https://...:8443/oapi/v1/namespaces/xxia-test/buildconfigs/project/webhooks/undefined/generic

Click "Click to clipboard", paste, the pasted url also includes "undefined"

Check BC Configuration tab, the webhook urls are valid like:
https://...:8443/oapi/v1/namespaces/xxia-test/buildconfigs/project/webhooks/uaI8TxDyq0WhJwd20JIH/generic


Expected results:

Should be valid urls, like in BC Configuration tab

Comment 1 Ricardo Zanini 2018-11-22 14:18:49 UTC
Found a similar BUG in:

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

Comment 2 Yanping Zhang 2018-11-26 09:35:16 UTC
openshift v3.9.54
kubernetes v1.9.1+a0ce1bc657
registry.reg-aws.openshift.com:443/openshift3/ose-web-console               v3.9.54             17e06f6aefca        44 hours ago        488 MB

Checked on web console with steps in bug description. Just met the issue one time after trying at least ten times. This requests the copy action taking place right after the secret is created and added as webhook.

After the webhook secret is deleted, the webhookurl on configuration page changed, and there are errors in debug console, pls refter to screenshot.

Comment 3 Yanping Zhang 2018-11-26 09:35:45 UTC
Created attachment 1508514 [details]
screenshot1

Comment 4 Jakub Hadvig 2019-01-13 20:22:54 UTC
Fixing PR: https://github.com/openshift/origin-web-console/pull/3097

Comment 5 Yanping Zhang 2019-01-15 07:02:27 UTC
Tested on ocp 3.9, ocp 3.10, ocp 3.11 separately with detailed version:
v3.9.64
v3.10.98
v3.11.69

On bc edit page, add generic webhook trigger immediately after created a webhook secret, then check and copy the Generic Webhook URL on bc configuration tab, the url is correct.
After delete the webhook secret, check the Generic Webhook URL on bc configuration tab, it shows info: "Not available".

The bug is fixed, so move it to Verified.

Comment 7 errata-xmlrpc 2019-01-30 15:10:24 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-2019:0098