Bug 1590743

Summary: No return for gitlab and bitbucket webhook when use --list-webhooks=all
Product: OpenShift Container Platform Reporter: Wenjing Zheng <wzheng>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: low Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Webhook types where matched manually. Consequence: It failed to list bitbucket and gitlab webhooks. Fix: Refactor the code responsible for listing webhooks to be more dynamic when new webhook types are added. Result: All webhook types are listed correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:40:21 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 Wenjing Zheng 2018-06-13 10:02:16 UTC
Description of problem:
No return for gitlab and bitbucket webhook when use --list-webhooks=all although they have been set:
$ oc start-build ruby-ex --list-webhooks=all
github https://xxxx:8443/apis/build.openshift.io/v1/namespaces/wzheng1/buildconfigs/ruby-ex/webhooks/<secret>/github
generic https://xxxxx:8443/apis/build.openshift.io/v1/namespaces/wzheng1/buildconfigs/ruby-ex/webhooks/<secret>/generic

Version-Release number of selected component (if applicable):
oc v3.10.0-0.63.0
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO

How reproducible:
always

Steps to Reproduce:
1.oc new-app ruby~https://github.com/openshift/ruby-ex
2.oc set triggers bc/ruby-ex --from-bitbucket
3.oc set triggers bc/ruby-ex --from-gitlab
4.oc start-build ruby-ex --list-webhooks=all

Actual results:
$ oc start-build ruby-ex --list-webhooks=all
github https://xxxx:8443/apis/build.openshift.io/v1/namespaces/wzheng1/buildconfigs/ruby-ex/webhooks/<secret>/github
generic https://xxxxx:8443/apis/build.openshift.io/v1/namespaces/wzheng1/buildconfigs/ruby-ex/webhooks/<secret>/generic

Expected results:
Should also list gitlab and bitbucket webhoos.

Additional info:

Comment 2 Maciej Szulik 2019-02-28 13:19:27 UTC
Fix in https://github.com/openshift/origin/pull/22192

Comment 4 Wenjing Zheng 2019-03-15 08:26:58 UTC
Verified with below version:
[wzheng@openshift-qe 4.0]$ oc start-build ruby-ex --list-webhooks=all
github https://api.qe-wzheng-212114.qe.devcluster.openshift.com:6443/apis/build.openshift.io/v1/namespaces/wzheng1/buildconfigs/ruby-ex/webhooks/<secret>/github
generic https://api.qe-wzheng-212114.qe.devcluster.openshift.com:6443/apis/build.openshift.io/v1/namespaces/wzheng1/buildconfigs/ruby-ex/webhooks/<secret>/generic
[wzheng@openshift-qe 4.0]$ oc version --short
Client Version: v4.0.22
Server Version: v1.12.4+4836bc9

Comment 6 errata-xmlrpc 2019-06-04 10:40:21 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:0758