Feature Request P3
Status Update
Comments
[Deleted User] <[Deleted User]> #3
Luca, could we get this for 3.6 and 3.7 too?
ap...@google.com <ap...@google.com> #6
Project: gerrit
Branch: stable-3.7
commit 07cd360d39f3f70b31d95aa0417944b6df0dd186
Author: Matthias Sohn <matthias.sohn@sap.com>
Date: Sat Aug 19 20:04:04 2023
Update webhooks plugin to 1dc0a71883
This includes the following changes:
1dc0a71 Add HTTP response code 'SC_ACCEPTED' (202) as success case in response handler
16110f3 Annotate methods that return a definitely null value with @Nullable
and fixes:
Issue 40015349 "plugins/webhooks doesn't accept HTTP 202 response code"
Release-Notes: Include fix of Issue 40015349 for webhooks plugin
Change-Id: Ie1cbca18cfb994b155d46c35e64152a76ce9b192
M plugins/webhooks
https://gerrit-review.googlesource.com/383361
Branch: stable-3.7
commit 07cd360d39f3f70b31d95aa0417944b6df0dd186
Author: Matthias Sohn <matthias.sohn@sap.com>
Date: Sat Aug 19 20:04:04 2023
Update webhooks plugin to 1dc0a71883
This includes the following changes:
1dc0a71 Add HTTP response code 'SC_ACCEPTED' (202) as success case in response handler
16110f3 Annotate methods that return a definitely null value with @Nullable
and fixes:
Release-Notes: Include fix of
Change-Id: Ie1cbca18cfb994b155d46c35e64152a76ce9b192
M plugins/webhooks
ap...@google.com <ap...@google.com> #7
Project: gerrit
Branch: stable-3.6
commit 5b65e5e9486da0d8fc682fe3e80f5d468e1bb15b
Author: Matthias Sohn <matthias.sohn@sap.com>
Date: Sat Aug 19 19:21:52 2023
Update webhooks plugin to 1dc0a71883
This includes the following changes:
1dc0a71 Add HTTP response code 'SC_ACCEPTED' (202) as success case in response handler
16110f3 Annotate methods that return a definitely null value with @Nullable
and fixes:
Issue 40015349 "plugins/webhooks doesn't accept HTTP 202 response code"
Release-Notes: Include fix of Issue 40015349 for webhooks plugin
Change-Id: I2805c1060dcbfbf18c15bb3669010047e9038df8
M plugins/webhooks
https://gerrit-review.googlesource.com/383360
Branch: stable-3.6
commit 5b65e5e9486da0d8fc682fe3e80f5d468e1bb15b
Author: Matthias Sohn <matthias.sohn@sap.com>
Date: Sat Aug 19 19:21:52 2023
Update webhooks plugin to 1dc0a71883
This includes the following changes:
1dc0a71 Add HTTP response code 'SC_ACCEPTED' (202) as success case in response handler
16110f3 Annotate methods that return a definitely null value with @Nullable
and fixes:
Release-Notes: Include fix of
Change-Id: I2805c1060dcbfbf18c15bb3669010047e9038df8
M plugins/webhooks
Description
*************************************************************************
*** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!
*** Do not submit bugs for chrome/android and issues with your company's
*** Gerrit setup here. Those issues belong in different issue trackers.
*************************************************************************
What steps will reproduce the problem?
1. Create a webhook against an endpoint that doesn't reply with 200, 201 or 204
What is the expected output?
Webhooks plugins should accept HTTP 202 as a response code.
What do you see instead?
The plugin keeps re-sending the same payload until maxTries has been reached, causing multiple pipeline triggers.
Please provide any additional information below.
Valid response codes should be configurable on the plugin.
A Tekton EventListener responds with a 202 ACCEPTED HTTP response when the EventListener has been able to process the request and selected the appropriate triggers to process based off the EventListener configuration.https://tekton.dev/docs/triggers/eventlisteners/#understanding-eventlistener-response
Related plugin source codehttps://gerrit.googlesource.com/plugins/webhooks/+/d8815bf9660b6655696db242b8ad2801e866c036/src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpResponseHandler.java#50
HttpServletResponsehttps://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html