Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/build/registry/buildconfig/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (h *WebHookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

// ProcessWebHook does the actual work of processing the webhook request
func (w *WebHookHandler) ProcessWebHook(writer http.ResponseWriter, req *http.Request, ctx apirequest.Context, name, subpath string) error {
parts := strings.Split(subpath, "/")
parts := strings.Split(strings.TrimPrefix(subpath, "/"), "/")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bparees fyi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soltysh thanks.... k8s changed something about how the provide the request path to us??

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subresource path was stripping leading/trailing slashes incorrectly. Fixed in 1.7.8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, just that.

if len(parts) != 2 {
return errors.NewBadRequest(fmt.Sprintf("unexpected hook subpath %s", subpath))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ items:
kind: Role
name: shared-resource-viewer
subjects:
- kind: Group
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:authenticated
kind: List
metadata: {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ items:
kind: ClusterRole
name: system:image-puller
subjects:
- kind: Group
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:serviceaccounts:myproject
- apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
Expand Down