Skip to content
Snippets Groups Projects

Ignore ci_default_git_depth parameter for project creation endpoint

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

  1. 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 the ci_default_git_depth parameter is ignored
  2. 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 or Git 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.

Related to #393502 (closed)

Edited by Jerry Seto

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Hitesh Raghuvanshi removed review request for @hraghuvanshi

    removed review request for @hraghuvanshi

  • Jerry Seto added 418 commits

    added 418 commits

    Compare with previous version

  • Jerry Seto changed the description

    changed the description

  • Jerry Seto requested review from @hraghuvanshi

    requested review from @hraghuvanshi

  • Hitesh Raghuvanshi removed review request for @hraghuvanshi

    removed review request for @hraghuvanshi

  • Jerry Seto mentioned in merge request !124222 (closed)

    mentioned in merge request !124222 (closed)

  • Jerry Seto requested review from @hraghuvanshi

    requested review from @hraghuvanshi

  • Hitesh Raghuvanshi approved this merge request

    approved this merge request

  • Hitesh Raghuvanshi requested review from @ashmckenzie and removed review request for @hraghuvanshi

    requested review from @ashmckenzie and removed review request for @hraghuvanshi

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading