Skip to content

Add Validation for App Setting namespace_storage_forks_cost_factor

What does this MR do and why?

Add validation for namespace_storage_forks_cost_factor application setting.

Ensure value is between 0 and 1.

This application setting was added to the application_settings table in !126259 (merged).

It is not used for anything yet. A constraint added in !126259 (merged) keeps the value between 0 and 1 at the database layer. This MR adds a rails validation for good error handling at the application layer; otherwise we just hit the constraint at the database and throw an error.

The default value is 1.0.

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/404628

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 Jason Goodman

Merge request reports