GeoHealthCheck icon indicating copy to clipboard operation
GeoHealthCheck copied to clipboard

Feature/add data to webhook

Open om-henners opened this issue 1 year ago • 3 comments

Add the run data to the webhook message.

The gaol is that we should be able to use the data coming to the webhook to triage and send to other systems (alerting systems etc), and to do that it's useful to distinguish between the error messages that come through. So this adds that data in without modifying the existing data.

Happy to add tests as required.

om-henners avatar Aug 29 '24 03:08 om-henners

@om-henners also thanks here! Makes sense. Yes, please add tests. There are existing notification/webhook tests: https://github.com/geopython/GeoHealthCheck/blob/master/tests/test_resources.py#L115.

justb4 avatar Aug 29 '24 11:08 justb4

@tomkralidis you have time to review/maybe merge?

justb4 avatar Aug 29 '24 11:08 justb4

@justb4 added a simple test (sorry it took a little time to get to it my end). Happy to add more detail. But the most important thing I should note is that in doing so I introduced the https://github.com/getsentry/responses library as a testing lib to handle testing calling the webhook endpoint.

(I did try speeding things up for the testRunResources test using responses as well, but I couldn't get it working - lots of URL juggling with multiple redirects. Maybe a future cleanup PR!)

om-henners avatar Sep 10 '24 06:09 om-henners