Ignore ci_default_git_depth parameter for project creation endpoint
requested to merge 393502-creating-a-project-with-ci_default_git_depth-within-group-causes-500-when-enabling-group into master
What does this MR do and why?
The ci_default_git_depth
parameter was included among the declared parameters for project creation. This is not actually supported and would result in the ci_cd_setting association being loaded before being created. With the ci_cd_setting
not being created as a result.
Instead we ignore the ci_default_git_depth parameter during create by moving it to the update parameters.
Contributes to: #393502 (closed)
How to set up and validate locally
- Try creating a project through the API (Something like
curl -XPOST 'http://gdk.test:3000/api/v4/projects' --header "PRIVATE-TOKEN: token" --header "Content-Type: application/json" --data '{"name": "test-settings", "namespace_id": 1, "ci_default_git_depth": 1}'
) and see that the project is created and theci_default_git_depth
parameter is ignored - Try to change ci/cd settings for the project (Settings -> CI/CD) that exist on the ci_cd_setting association. For example
Keep artifacts from most recent successful jobs
orGit shallow clone
. There should be no unexpected errors here.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #393502 (closed)
Edited by Jerry Seto