Bug 1384617

Summary: Incorrect Webhook URL in the UI.
Product: OpenShift Container Platform Reporter: Alfredo Quiroga <aquiroga>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: aos-bugs, aquiroga, jhadvig, jokerman, mmccomas, nschuetz, xiaocwan, yapei
Target Milestone: ---   
Target Release: 3.3.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously the URL for the webhook was assembled in a wrong way, where not the variable value for build config name and project name was used, but the the variable name itself was used. That was caused by incorrect 'editWebhookTriggers' directive's scope attribute type for the build config and project name. Now the issue is fixed and the variables values are used.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-27 15:43:06 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 Alfredo Quiroga 2016-10-13 16:55:58 UTC
Description of problem:

Get the incorrect Webhook URL.

Version-Release number of selected component (if applicable):

Version

OpenShift Master:
v3.3.0.34
Kubernetes Master:
v1.3.0+52492b4

How reproducible:

Consistently

Steps to Reproduce:
1. In the web console, go to Builds -> Your-Build-Name -> Action -> Edit
2. Copy the webhook URL and put it in a document.
3. Now go to Builds -> Your-Build-Name -> Configuration
4. Copy the webhook URL and put it in a document.
5. Compare URLs.
6. When getting the URL via step 2, the URL is incorrect.

Actual results:


Expected results:


Additional info:

Comment 1 Jessica Forrester 2016-10-13 18:10:37 UTC
@jhadvig the webhooks in the build config editor are incorrect.

Examples for comparison:

From editor: https://10.245.2.2:8443/oapi/v1/namespaces/project.metadata.name/buildconfigs/buildConfig.metadata.name/webhooks/6301dd92fa593571/github

From build configuration tab: https://10.245.2.2:8443/oapi/v1/namespaces/myproject/buildconfigs/php/webhooks/ed56abb1bd66ba76/generic

The one in the editor isn't getting the variables for project and build config name replaced.

Comment 2 openshift-github-bot 2016-10-13 20:11:11 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/8311b12d7ce72ba78c6cf083cda9a2de6302d18b
Bug 1384617: Incorrect Webhook URL in the UI

Comment 4 Yadan Pei 2016-10-17 06:58:14 UTC
Checked against v3.3.1.2

Webhook URL got from BC Configuration tab and BC Edit page are the same


When API port is set as 443, Webhook URL got from web console didn't contains the port number, just like https://<master>/oapi/v1/namespaces/yapei-manul-1/buildconfigs/php56/webhooks/e72f34f417f52839/github

When API port is set as 8443, Webhook URL got from web console contains the port number, just like https://<master>:8443/oapi/v1/namespaces/yapei-manul-1/buildconfigs/php56/webhooks/e72f34f417f52839/github

Move to VERIFIED

Comment 6 errata-xmlrpc 2016-10-27 15:43:06 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-2016:2084