feat(settings): add missing rate limit fields to Settings

What does this MR do?

Adds 50 application settings fields that GET/PUT /application/settings accepts but Settings and UpdateSettingsOptions did not expose. All are rate limits or request limits:

  • throttle_authenticated_git_http_*, throttle_unauthenticated_git_http_*, throttle_authenticated_dependency_proxy_*, throttle_authenticated_mcp_*
  • users_api_limit_following, users_api_limit_followers, users_api_limit_status, users_api_limit_gpg_keys, users_api_limit_gpg_key
  • runner_jobs_request_api_limit, runner_jobs_patch_trace_api_limit, runner_jobs_endpoints_api_limit
  • web_hook_test_limit, web_hook_event_resend_limit
  • ai_action_api_rate_limit, raw_blob_request_limit_unauthenticated, tags_create_limit, git_push_pipeline_limit, pipeline_limit_per_user, ci_lint_limit_per_user
  • job_play_limit_per_user_project, job_retry_limit_per_user_project, pipeline_cancel_limit_per_user_project, pipeline_retry_limit_per_user_project
  • import_jobs_concurrency_limit, concurrent_pull_request_import_jobs_limit, concurrent_relation_export_limit, concurrent_relation_batch_export_limit
  • max_http_response_size_limit, max_github_response_size_limit
  • group_secrets_limit, project_secrets_limit, scan_execution_policies_action_limit, scan_execution_policies_schedule_limit
  • audit_events_api_limit, group_audit_events_api_limit, project_audit_events_api_limit, virtual_registries_endpoints_api_limit

API docs: https://docs.gitlab.com/api/settings/

Testing

  • TestSettings_RateLimits round-trips all 50 fields through GET and PUT.
  • 42 of the fields were also exercised end to end through terraform-provider-gitlab against a local GitLab 19.4.1-ee instance.
  • The 4 audit events and virtual registries limits are licence gated on the GitLab side and were validated at the struct and mock level only.

Attribute names that differ from the API docs

Four attributes are added under the names the API actually accepts, not the names in https://docs.gitlab.com/api/settings/:

Docs API (used here)
autocomplete_users autocomplete_users_limit
autocomplete_users_unauthenticated autocomplete_users_unauthenticated_limit
users_api_limit_key users_api_limit_ssh_key
users_api_limit_keys users_api_limit_ssh_keys

The docs have been wrong since the setting was introduced in GitLab 17.10; lib/api/settings.rb has only ever declared the _limit / _ssh_key names. Tracked in gitlab-org/gitlab#631701, docs fix in gitlab-org/gitlab!259044 (merged).

Related: gitlab-org/terraform-provider-gitlab#6897

The existing AutocompleteUsers and AutocompleteUsersUnauthenticated fields carry the wrong JSON names and are kept for compatibility, marked as deprecated in favour of the new fields.

Edited by Frederico Frazao

Merge request reports

Loading
Loading