Skip to content

Fix default values for the deprecated API throttle

What does this MR do and why?

The AddThrottleDeprecatedApiColumns migration does not currently match the db/structure.sql file, which was missed in final review. Add a new migration to ensure that the default values via migration match those in db/structure.sql

Here's the db/structure.sql that's currently on master, and that we want to end up matching:

    throttle_unauthenticated_deprecated_api_requests_per_period integer DEFAULT 1800 NOT NULL,
    throttle_unauthenticated_deprecated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
    throttle_unauthenticated_deprecated_api_enabled boolean DEFAULT false NOT NULL,
    throttle_authenticated_deprecated_api_requests_per_period integer DEFAULT 3600 NOT NULL,
    throttle_authenticated_deprecated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
    throttle_authenticated_deprecated_api_enabled boolean DEFAULT false NOT NULL,

These are the values we want, but the migration had the wrong ones specified for throttle_unauthenticated_deprecated_api_requests_per_period and throttle_authenticated_deprecated_api_period_in_seconds 😬

Rather than just modifying the wrong migration file, creating a new migration will ensure all GitLab instances have the same values, for not much extra work.

Here's the introducing MR: !70310 (comment 690987960)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Nick Thomas

Merge request reports