~sircmpwn/sr.ht-discuss

7 4

lists.sr.ht PATCHSET_RECEIVED webhooks broken?

Details
Message ID
<CUZ88W1KBX7U.3J5GJAO2KXKTV@ringo>
DKIM signature
missing
Download raw message
Hi all,

Since about a week, one of my webhooks has stopped receiving requests.

I double checked if it was still enabled and it had been deleted (maybe
a side effect of a database migration?). I created it again and it seems
to have stayed there:

~$ hut lists webhook list
#30 https://bot.diabeteman.com/sourcehut/

Here is the command I used to create it:

https://git.sr.ht/~rjarry/aerc/tree/master/item/contrib/ircbot/install-webhook.sh

Several patchsets have been received since then but they didn't trigger
a request on my http server. The last request I got is from august 12:

~# { grep -h POST.*sourcehut /var/log/nginx/access.log*; zgrep -h POST.*sourcehut /var/log/nginx/access.log*.gz; } | sort
[11/Aug/2023:21:06:28 +0200] 2604:bf00:710:0:5054:ff:fec4:6bfb -> bot.diabeteman.com: POST /sourcehut/ HTTP/1.1 -> 200 "Go-http-client/1.1"
[11/Aug/2023:21:16:19 +0200] 2604:bf00:710:0:5054:ff:fec4:6bfb -> bot.diabeteman.com: POST /sourcehut/ HTTP/1.1 -> 200 "Go-http-client/1.1"
[11/Aug/2023:21:27:20 +0200] 2604:bf00:710:0:5054:ff:fec4:6bfb -> bot.diabeteman.com: POST /sourcehut/ HTTP/1.1 -> 200 "Go-http-client/1.1"
[11/Aug/2023:23:31:11 +0200] 2604:bf00:710:0:5054:ff:fec4:6bfb -> bot.diabeteman.com: POST /sourcehut/ HTTP/1.1 -> 200 "Go-http-client/1.1"
[12/Aug/2023:00:54:41 +0200] 2604:bf00:710:0:5054:ff:fec4:6bfb -> bot.diabeteman.com: POST /sourcehut/ HTTP/1.1 -> 200 "Go-http-client/1.1"
[12/Aug/2023:09:22:51 +0200] 2604:bf00:710:0:5054:ff:fec4:6bfb -> bot.diabeteman.com: POST /sourcehut/ HTTP/1.1 -> 200 "Go-http-client/1.1"

Here is my nginx config if that matters:

https://git.sr.ht/~rjarry/aerc/tree/master/item/contrib/ircbot/nginx.conf

NB: I know there are some ACLs here but I never got any reject for POST
requests on that virtual host.

Does that ring a bell to anyone?

Thanks!

-- 
Robin
Details
Message ID
<CV5D5N377X1H.32PM4CF26APC5@ringo>
In-Reply-To
<CUZ88W1KBX7U.3J5GJAO2KXKTV@ringo> (view parent)
DKIM signature
missing
Download raw message
Robin Jarry, Aug 22, 2023 at 19:01:
> Does that ring a bell to anyone?

Hi all, this is a gentle ping.

I assume either this is an issue on my end (PEBCAK?) or nobody uses
these webhooks.

Could a kind administrator have a look at the logs to clear my
confusion?

Thanks!
Details
Message ID
<CV5OOFLOOI1O.ANHV1S0UA8N9@taiga>
In-Reply-To
<CV5D5N377X1H.32PM4CF26APC5@ringo> (view parent)
DKIM signature
missing
Download raw message
Do you see anything interesting when you dig through the webhook logs
via GraphQL?
Details
Message ID
<CV5S9NE4G9X1.SYC52UOCYELL@ringo>
In-Reply-To
<CV5OOFLOOI1O.ANHV1S0UA8N9@taiga> (view parent)
DKIM signature
missing
Download raw message
Drew DeVault, Aug 30, 2023 at 08:59:
> Do you see anything interesting when you dig through the webhook logs
> via GraphQL?

I tried this query on https://lists.sr.ht/graphql

  query {
    me {
      canonicalName
      lists {
        cursor
        results {
          id, name, updated
          webhooks {
            cursor
            results {
              url
              deliveries {
                cursor
                results {
                  uuid, date, event, requestBody, responseBody,
                  responseHeaders, responseStatus
                }
              }
            }
          }
        }
      }
    }
  }

But I get errors:

  Native webhooks are not supported with web authentication

I don't know what that means.
Details
Message ID
<a4m2c4oniqqupd5dma34l7vjxpya2yekxcx7looxhsl7msw6kz@t6qswodmafga>
In-Reply-To
<CV5S9NE4G9X1.SYC52UOCYELL@ringo> (view parent)
DKIM signature
missing
Download raw message
On Wed, Aug 30, 2023 at 11:48:24AM +0200, Robin Jarry wrote:
> But I get errors:
>
>   Native webhooks are not supported with web authentication
>
> I don't know what that means.

You have to run this query through curl/hut(1), e.g. like this:

hut graphql lists
Details
Message ID
<CV5SNC26SY90.1483NPXKU903X@ringo>
In-Reply-To
<a4m2c4oniqqupd5dma34l7vjxpya2yekxcx7looxhsl7msw6kz@t6qswodmafga> (view parent)
DKIM signature
missing
Download raw message
Thorben Günther, Aug 30, 2023 at 11:56:
> On Wed, Aug 30, 2023 at 11:48:24AM +0200, Robin Jarry wrote:
> > But I get errors:
> >
> >   Native webhooks are not supported with web authentication
> >
> > I don't know what that means.
>
> You have to run this query through curl/hut(1), e.g. like this:
>
> hut graphql lists

Ok thanks here's the output:

  ~$ hut graphql lists --stdin <<EOF
  query {
    user(username: "rjarry") {
      canonicalName
      list(name: "aerc-devel") {
        name
        webhook(id: 30) {
          id
          url
          query
          events
          deliveries {
            cursor
            results {
              uuid, date, event, requestBody, responseBody,
              responseHeaders, responseStatus
            }
          }
        }
      }
    }
  }
  EOF
  {
    "user": {
      "canonicalName": "~rjarry",
      "list": {
        "name": "aerc-devel",
        "webhook": {
          "id": 30,
          "url": "https://bot.diabeteman.com/sourcehut/",
          "query": "query {\n\twebhook {\n\t\tuuid\n\t\tevent\n\t\tdate\n\t\t... on PatchsetEvent {\n\t\t\tpatchset {\n\t\t\t\tid\n\t\t\t\tsubject\n\t\t\t\tversion\n\t\t\t\tprefix\n\t\t\t\tlist {\n\t\t\t\t\tname\n\t\t\t\t\towner {\n\t\t\t\t\t\t... on User {\n\t\t\t\t\t\t\tcanonicalName\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsubmitter {\n\t\t\t\t\t... on User {\n\t\t\t\t\t\tcanonicalName\n\t\t\t\t\t}\n\t\t\t\t\t... on Mailbox {\n\t\t\t\t\t\tname\n\t\t\t\t\t\taddress\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
          "events": [
            "PATCHSET_RECEIVED"
          ],
          "deliveries": {
            "cursor": null,
            "results": []
          }
        }
      }
    }
  }

It looks like there were no deliveries. Which is in line with what
I observe. However, several patchsets were received since this webhook
was installed.
Details
Message ID
<CVA8W4RPPZ4E.19CYZCQRADLUS@ringo>
In-Reply-To
<CV5SNC26SY90.1483NPXKU903X@ringo> (view parent)
DKIM signature
missing
Download raw message
Gentle bump again. Could an admin have a look at the logs?

Thanks!
Details
Message ID
<7e3e210c-d125-4979-86a3-a5766649f3b3@bitfehler.net>
In-Reply-To
<CVA8W4RPPZ4E.19CYZCQRADLUS@ringo> (view parent)
DKIM signature
missing
Download raw message
On 9/4/23 17:40, Robin Jarry wrote:
> Gentle bump again. Could an admin have a look at the logs?

I did, but couldn't really find anything relevant. I suspect there might 
be a bug involved, either something systemic with webhooks, or some 
botched error handling that your specific webhook is hitting. I'll look 
into it, but it might take a moment.

Cheers,
Conrad
Reply to thread Export thread (mbox)