github_exporter
github_exporter copied to clipboard
Failed to parse github event (field custom_properties)
When using webhook to export workflows event, i got the following error in the exporter:
{"error":"json: cannot unmarshal array into Go struct field Repository.repository.custom_properties of type string","level":"error","msg":"failed to parse github event"...
It looks like the json format send by Github is not the one you expect, especially on field custom_properties. I may come from https://github.com/google/go-github/issues/3229 which was fixed, then i think that you have updated the dependency as well.
I'm using the HelmChart and it runs the version
Image: quay.io/promhippie/github-exporter:3.1.2 │
Image ID: quay.io/promhippie/github-exporter@sha256:25eb9b1a7ac7bd82d3fe59ae3ee59abf6da61d8fc2b0d32d3a0945269b4a4a4d
What can happen, is the image not fully up to date ?
Thanks for reporting this. Can you verify that the latest tag fixes the issue?
Than it's really just doing a new release to include the fix of the go library.
That's it, latest is working :)
Thank you
Thanks for the confirmation, I will check if there are other changes that got to be added and hopefully provide a new release next week.
This should be resolved with the release of v4.0.0, if something is missing or not working please raise an issue. The release should pop up in a few minutes.
This should be resolved with the release of v4.0.0, if something is missing or not working please raise an issue. The release should pop up in a few minutes.
I'm not able to test it right now.
I'm facing a new issue, when trying to call the webhook with the path from GITHUB_EXPORTER_WEBHOOK_PATH i get a 301 redirect to /metrics. I'm using HelmChart 5.0.1 (version 4.0.0 of the image). I only changed the version in my helm install call.
Do you have any idea on what can happen ?
It got "breaking" changes, that's why it's a new major version. The config to enable the webhook have been changed from collector.workflows to collector.workflow_runs. It's related to https://github.com/promhippie/github_exporter/releases/tag/v4.0.0 -> "Change https://github.com/promhippie/github_exporter/pull/412: Change config and metric names for workflows"
Just to clarify the issue you are facing, the exporter got a default for unknown routes to redirect to the metrics endpoint. The webhook endpoint is enabled only if GITHUB_EXPORTER_COLLECTOR_WORKFLOW_RUNS or GITHUB_EXPORTER_COLLECTOR_WORKFLOW_JOBS have been enabled.
Oh okay i see... so i had to update my values ;) Everythink is ok now, thank you