actions-runner-controller: webhook server: "cache contained , which is not an Object" when handling check_run event
Describe the bug When receiving a check_run event, the webhook server throws an error, which states the following:
ERROR controllers.Runner handling check_run event {"event": "check_run", "hookID": "xxxxxxxxx", "delivery": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "checkRun.status": "completed", "action": "completed", "error": "cache contained <nil>, which is not an Object"}
Checks
- My actions-runner-controller version (v0.19.0) does support the feature
- I’m using an unreleased version of the controller I built from HEAD of the default branch
To Reproduce Steps to reproduce the behavior:
- Follow the install guide
- Configure the Helm chart to start the Webhook server, expose it
- Create a webhook in GitHub to listen for
check_run
events - Run a workflow to trigger an event
- Observe the error in the Webhook server’s logs
Expected behavior
I’ve configured a HorizontalRunnerAutoscaler to scale on a check_run
event, so the expected behavior is for a new runner to be spun up.
Environment (please complete the following information):
- Controller Version: 0.19.0
- Deployment Method: Helm
- Helm Chart Version: 0.12.7
Additional context I’ve authenticated via an app with the following permissions:
Actions (read)
Checks (read)
Metadata (read)
Self-hosted runners (read / write)
This is the runner configuration I’m using:
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: senteca-runner
spec:
template:
spec:
organization: senteca
dockerdWithinRunnerContainer: true
env:
- name: STARTUP_DELAY_IN_SECONDS
value: "10"
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
name: senteca-runner-autoscaler
spec:
scaleTargetRef:
name: senteca-runner
scaleDownDelaySecondsAfterScaleOut: 60
minReplicas: 0
maxReplicas: 5
scaleUpTriggers:
- githubEvent:
checkRun:
types: ["created"]
status: "queued"
amount: 1
duration: "5m"
This is how my GitHub webhook looks like:
Any hints as to what may be wrong on my end are welcome. Thanks in advance :^)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 24 (2 by maintainers)
In my case I had to delete github-webhook-server pod. After restart it started working.
same for us.
cache contained <nil>
occurred when deleting a runnerDeployment+HRA and recreating it in a different namespace or a different name. Chart: 0.14.0, app: 0.20.2I’ve just seen it reappear, and it was straight after deleting a runnerdeployment and its matching HRA. Perhaps it’s to do with deleting an object and the webhook service not handling it properly?
also started seeing this with chart v0.13.0 and controller v0.20.0:
Restarting the pods solved it for the time being