the endpoint /job/allowed_agents does not populate the fields
Summary
The API output of the /job/allowed_agents
call does not include all the information that should be returned. (more details in examples).
For reference - GitLab Docs output.
Steps to reproduce
GitLab 15.6 output:
Click to expand
{
"allowed_agents": [
{
"id": 4143,
"config_project": {
"id": 21222450,
"description": null,
"name": "agent1-test",
"name_with_namespace": "Name with namespace here",
"path": "agent1-test",
"path_with_namespace": "name-with/namespace/here",
"created_at": "2022-01-18T15:06:41.422Z"
},
"configuration": {}
}
],
"job": {
"id": 2223480651
},
"pipeline": {
"id": 774876553
},
"project": {
"id": 21068801,
"groups": [
{
"id": 186824
},
{
"id": 146791
},
{
"id": 25024
}
]
},
...
GitLab 14.0 output:
Click to expand
{
"allowed_agents": [],
"job": {
"id": 3,
"name": "test1",
"stage": "test",
"project_id": 4,
"project_name": "balerion"
},
"pipeline": {
"id": 3,
"project_id": 4,
"sha": "67b2dfb250e5eb02c48420dad524ca65d01cdc99",
"ref": "master",
"status": "running",
"created_at": "2022-11-15T09:10:40.198Z",
"updated_at": "2022-11-15T09:10:47.267Z",
"web_url": "https://domain.com/naboo/balerion/-/pipelines/3"
},
"project": {
"id": 4,
"description": "The HDD monitor is down, parse the multi-byte interface so we can index the TCP matrix!",
"name": "balerion",
"name_with_namespace": "Naboo / balerion",
"path": "balerion",
"path_with_namespace": "naboo/balerion",
"created_at": "2022-11-15T08:34:42.947Z"
},
...
}
Example Project
https://gitlab.com/gitlab-gold/faleksic-tests/private-group/ci-testing-private/-/jobs/3323921774 (Internal only)
What is the current bug behavior?
The fields are not expanded and only contain the IDs.
What is the expected correct behavior?
Fields are populated.
Relevant logs and/or screenshots
My understanding is that the API endpoint changed with the Move API CI related classes under Ci namespace merge request. The endpoint changed from v14.0.0-ee GET '/allowed_agents' to v14.6.0-ee GET '/allowed_agents'.
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Proposal
The API was previously returning too much data. We need to update the documentation to reflect the current responses.