apache / apache/openwhisk-catalog

Github is failing to clean up webhooks during DELETE lifecycle

Open
#252 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
34
Forks
45
PR merge metrics
No merged PRs in 30d

Description

I was using the IBM Cloud Functions UI and I noticed the following behavior for Github trigger.

When I would create a trigger it would appear to create the Trigger and the Feed fine. The feed calls response was:
`
{"duration":589,"name":"webhook","subject":"eweiter@us.ibm.com","activationId":"e8ec3315288c4457ac3315288cf457d1","publish":false,"annotations":[{"key":"path","value":"whisk.system/github/webhook"},{"key":"waitTime","value":37},{"key":"kind","value":"nodejs:6"},{"key":"limits","value":{"timeout":60000,"memory":256,"logs":10}},{"key":"initTime","value":249}],"version":"0.0.264","response":{"result":{"response":"{\"type\":\"Repository\",\"id\":20159188,\"name\":\"web\",\"active\":true,\"events\":[\"push\"],\"config\":{\"url\":\"https://xxx:yyy@10.121.10.111:443/api/v1/namespaces/eweiter%40us.ibm.com_dev/triggers/JasonTest\",\"content_type\":\"json\",\"insecure_ssl\":\"0\"},\"updated_at\":\"2018-01-16T17:52:37Z\",\"created_at\":\"2018-01-16T17:52:37Z\",\"url\":\"https://api.github.com/repos/eweiter/bumblefoot/hooks/20159188\",\"test_url\":\"https://api.github.com/repos/eweiter/bumblefoot/hooks/20159188/test\",\"ping_url\":\"https://api.github.com/repos/eweiter/bumblefoot/hooks/20159188/pings\",\"last_response\":{\"code\":null,\"status\":\"unused\",\"message\":null}}"},"success":true,"status":"success"},"end":1516125157900,"logs":[],"start":1516125157311,"namespace":"eweiter@us.ibm.com_dev"}
`
To me it is showing that a "Push" event was created and that it is Active.

However when I go to delete that Trigger, the Feed deletion encounters an error. The Feed deletion response was:
`
{"duration":207,"name":"webhook","subject":"eweiter@us.ibm.com","activationId":"6a3da00bcc7448e6bda00bcc7438e60d","publish":false,"annotations":[{"key":"limits","value":{"timeout":60000,"memory":256,"logs":10}},{"key":"path","value":"whisk.system/github/webhook"},{"key":"kind","value":"nodejs:6"},{"key":"waitTime","value":23}],"version":"0.0.264","response":{"result":{"error":"Found no existing webhooks for trigger URL https://xxx:yyy@10.121.10.111:443/api/v1/namespaces/eweiter%40us.ibm.com_dev/triggers/JasonTest"},"success":false,"status":"application error"},"end":1516125185130,"logs":[],"start":1516125184923,"namespace":"eweiter@us.ibm.com_dev"}
`
Where it is telling me that it couldn't find any hooks on that trigger to delete and it is returning a status code of 502.

Steps to recreate:
1) Create a Trigger with the Github feed using the "push" event
2) Delete the Trigger

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.