actions-runner-controller/controllers/actions.summerwind.net
Nuru 9bd4025e9c
Stricter filtering of check run completion events (#2520)
I observed that 100% of canceled jobs in my runner pool were not causing scale down events. This PR fixes that.

The problem was caused by #2119. 

#2119 ignores certain webhook events in order to fix #2118. However, #2119 overdoes it and filters out valid job cancellation events. This PR uses stricter filtering and add visibility for future troubleshooting.

<details><summary>Example cancellation event</summary>

This is the redacted top portion of a valid cancellation event my runner pool received and ignored.

```json
{
  "action": "completed",
  "workflow_job": {
    "id": 12848997134,
    "run_id": 4738060033,
    "workflow_name": "slack-notifier",
    "head_branch": "auto-update/slack-notifier-0.5.1",
    "run_url": "https://api.github.com/repos/nuru/<redacted>/actions/runs/4738060033",
    "run_attempt": 1,
    "node_id": "CR_kwDOB8Xtbc8AAAAC_dwjDg",
    "head_sha": "55bada8f3d0d3e12a510a1bf34d0c3e169b65f89",
    "url": "https://api.github.com/repos/nuru/<redacted>/actions/jobs/12848997134",
    "html_url": "https://github.com/nuru/<redacted>/actions/runs/4738060033/jobs/8411515430",
    "status": "completed",
    "conclusion": "cancelled",
    "created_at": "2023-04-19T00:03:12Z",
    "started_at": "2023-04-19T00:03:42Z",
    "completed_at": "2023-04-19T00:03:42Z",
    "name": "build (arm64)",
    "steps": [

    ],
    "check_run_url": "https://api.github.com/repos/nuru/<redacted>/check-runs/12848997134",
    "labels": [
      "self-hosted",
      "arm64"
    ],
    "runner_id": 0,
    "runner_name": "",
    "runner_group_id": 0,
    "runner_group_name": ""
  },
```

</details>
2023-04-27 13:15:23 +09:00
..
metrics Changes to folder structure to allow multigroups and changed go mod name (#2105) 2022-12-28 09:38:34 +09:00
testdata Changes to folder structure to allow multigroups and changed go mod name (#2105) 2022-12-28 09:38:34 +09:00
autoscaling.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
autoscaling_test.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
constants.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
horizontal_runner_autoscaler_batch_scale.go Ensure that EffectiveTime is updated on webhook scale down (#2258) 2023-03-01 08:27:37 +09:00
horizontal_runner_autoscaler_webhook.go Stricter filtering of check run completion events (#2520) 2023-04-27 13:15:23 +09:00
horizontal_runner_autoscaler_webhook_test.go chore(deps): bump sigs.k8s.io/controller-runtime from 0.13.1 to 0.14.1 (#2132) 2023-01-27 09:23:28 +09:00
horizontal_runner_autoscaler_webhook_worker.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
horizontal_runner_autoscaler_webhook_worker_test.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
horizontalrunnerautoscaler_controller.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
integration_test.go Fix docker.sock permission error for non-dind Ubuntu 20.04 runners since v0.27.2 (#2499) 2023-04-17 21:30:41 +09:00
multi_githubclient.go Check if appID and instID are non-empty before attempting to parseInt (#2463) 2023-04-03 09:06:59 +09:00
new_runner_pod_test.go Revert docker.sock path to /var/run/docker.sock (#2536) 2023-04-27 13:06:35 +09:00
persistent_volume_claim_controller.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
persistent_volume_controller.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
pod_runner_token_injector.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runner_controller.go Revert docker.sock path to /var/run/docker.sock (#2536) 2023-04-27 13:06:35 +09:00
runner_graceful_stop.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runner_pod.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runner_pod_controller.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runner_pod_owner.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runnerdeployment_controller.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runnerdeployment_controller_test.go Disable metrics serving in proxy tests (#2307) 2023-02-22 16:57:59 +00:00
runnerreplicaset_controller.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
runnerreplicaset_controller_test.go Disable metrics serving in proxy tests (#2307) 2023-02-22 16:57:59 +00:00
runnerset_controller.go Fix docker.sock permission error for non-dind Ubuntu 20.04 runners since v0.27.2 (#2499) 2023-04-17 21:30:41 +09:00
schedule.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
schedule_test.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
suite_test.go chore(deps): bump sigs.k8s.io/controller-runtime from 0.13.1 to 0.14.1 (#2132) 2023-01-27 09:23:28 +09:00
sync_volumes.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
testresourcereader.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
testresourcereader_test.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
utils.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00
utils_test.go Update controller package names to match the owning API group name (#2150) 2023-01-13 08:24:11 +09:00