Certain parameters which should be able to be altered through the API are not updating properly.
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Certain parameters which should be able to be altered through the API are not updating properly. For example, I make a PUT request to https://gitlab.com/api/v4/projects/:id where my body includes the following:
{
"ci_default_git_depth": 0
}
I get a 200 status code in return, yet the parameter is not updated. This issue occurs with several parameters on the API. It fails both when manually making the API call, or while using Gitbeaker. Once the value of the parameter has been changed once, it somehow can be altered through the API, but changing it from it's initial value to any other value can only be done through the GitLab GUI.
The problem occurs across multiple projects, but from what I can find, it only seems to occur for the following parameters:
- ci_allow_fork_pipelines_to_run_in_parent_project
- ci_default_git_depth
- ci_forward_deployment_enabled
- ci_separated_caches
- group_runners_enabled
- keep_latest_artifact
- merge_pipelines_enabled
Steps to reproduce
I am having trouble reproducing it, the issue seems to occur only for certain projects on our instance.
What is the current bug behavior?
The API returns a status code 200, with the project schema, which doesn't show ci_default_git_depth updated, it still shows null instead of 20.
What is the expected correct behavior?
The API should return status code 200 and show the updated property in the response body.
Relevant logs and/or screenshots
Below is a screenshot of Insomnnia where I make a PUT call to a project where I set the variable ci_default_git_depth to 20. Shown on the right is the 200 statuscode and the value which is still null in the return body.
We use a SaaS instance with a GitLab Premium license.
