I'm using webhooks to trigger new builds for a static site. It triggers builds on netlify and azure devops. The netlify triggers fine, the azure automatic trigger stopped working yesterday ~4pm EST. However when I test trigger it, it builds.
We narrowed down the issue to the json being sent along with the automated trigger. The Azure DevOps webhook needs a simple clean POST. The json from the "trigger it" button still went through and gets a 200 response, but something in the automated triggering data breaks it. Not sure if this was a change on prismic or msft end.
Welcome to the Prismic community.
Please look in the logs tab and tell us what the response you get for your past triggers is? Do you have an error message?
Also, from the Azure side, do you have any errors?
To further investigate, can you share your repository name (in a private message if necessary)?
Looking forward to your reply,
Checked the logs tab, no errors, getting a 200 response code. There's nothing I can see in Azure.
I suspect something may have changed on the Azure side, but would like te option to send a POST from Prismic without any content.
What do you mean by ", but would like the option to send a POST from Prismic without any content." how this can be useful to solve this issue?
You know to can trigger your webhook manually does this help to debug?
And I still believe the best way to resolve this issue is to have some logs from Azure side as the triggers from Prismic are passing.
The issue is that the webhook trigger also has a json in the body. I was using Generic webhook based triggers for YAML pipelines to trigger the build. Something in that json breaks the MSFT trigger, when sending just the url it works (I confirmed this by testing in Postman).
I also reached out to MSFT but once I had a workaround they seem to have forgotten about the issue.
Is it that Azure rejects the payload that Prismic provides and needs some sort of custom Body? will that solve the issue?
It’s weird, Azure doesn’t require a payload, but something in the Prismic payload breaks it. Only the actual trigger used when adding documents, not the testing button in Prismic. The response code stays a 200.
Have you been able to figure out the cause of this issue? from our side, it will be tough to investigate this without any evidence such as logs/errors
I worked on it a while ago, to be helpful you’d need to follow up quicker.
If I remember correctly, Azure DevOps is simply exposing a webhook, without giving me logs. There's just an error code when I attempt to use the payload from Prismic (tested in Postman). Without any payload it works great. I ended up using a work around so msft didn't bother investigating or fixing anything on their end.
Thanks @lkonig for this clarification, and I apologize for the long delay.
I will create an issue in our tracker to try to reproduce the issue with Azure.
It would be great if you can share your workaround as it can be helpful to somebody else in the comunity.
Also to further investigate, can you share your repository name (in a private message if necessary)?
The workaround was simply to have Prismic trigger an Azure logic app, which them POST’ed just the webhook without any body.
Thanks for sharing this workaround.