is_shared attribute missing from job event webhook payload following ci_runner.is_shared removal MR
Summary
Prior to !54466 (merged) the payload of the job event webhook included a runner is_shared
attribute.
The ci_runner.is_shared
column was retired in gitlab-foss!20172 (merged) and removed in !54466 (merged). However, the runner API GET /runners/:id
API still includes an is_shared
attribute, which is now derived from the ci_runner.runner_type
column.
The job event webhook payload should also continue to include is_shared
, derived from runner_type
.
Additionally, both the API and webhook payload should include the new runner_type
attribute.
Steps to reproduce
- Create a Job Events web hook
- Run a CI/CD job
- Inspect the runner section of the payload generated by the webhook
What is the current bug behavior?
Job event webhook payload does not include is_shared
attribute, like it used to.
What is the expected correct behavior?
Job event webhook payload includes is_shared
attribute, derived from runner_type
, like it used to.
Relevant logs and/or screenshots
Runner section of job event webhook payload, prior to !54466 (merged):
"runner": {
"id": 8827,
"description": "my-runner",
"active": true,
"is_shared": true,
"tags": [
"docker"
]
}
Current runner section of job event webhook payload:
"runner": {
"id": 8827,
"description": "my-runner",
"active": true,
"tags": [
"docker"
]
}
Current result of GET /runners/:ID
API, containing is_shared
:
{
"id": 154,
"description": "docker-machine",
"ip_address": "35.201.27.107",
"active": true,
"is_shared": true,
"name": "gitlab-runner",
"online": true,
"status": "online",
"tag_list": [],
"run_untagged": true,
"locked": true,
"maximum_timeout": null,
"access_level": "not_protected",
"version": "13.11.0",
"revision": "7f7a4bb0",
"platform": "linux",
"architecture": "amd64",
"contacted_at": "2021-05-29T04:32:31.133Z",
"projects": [],
"groups": []
}
Possible fixes
Revert changes made in !54466 (merged) with respect to is_shared
.
Consider including runner_type
in runner API output and webhook payload.
Also update the webhook and possibly the runners API documentation to reflect the new state.