Skip to content

Use `Grape::Validations::Validators::Base` class

Luke Duncalfe requested to merge 415315-update-grape-validation-base-class into master

What does this MR do and why?

This MR replaces our use of the deprecated grape gem's Grape::Validations::Base class with Grape::Validations::Validators::Base instead.

The classes are a 1:1 of each other https://github.com/ruby-grape/grape/commit/937b2fc8a7081c5eb74ff8a4a760e30ebabbd780.

The deprecation warning was added in the grape gem 1.7.0 https://github.com/ruby-grape/grape/pull/2244 which was updated recently in our Gemfile !112854 (merged).

We've logged 500 million of the following deprecation warnings over the past week:

[DEPRECATION] `Grape::Validations::Base` is deprecated. Use `Grape::Validations::Validators::Base` instead.

#415315 (closed)

QA the change:

Run the validators specs with GITLAB_TESTING_LOG_LEVEL=warn:

GITLAB_TESTING_LOG_LEVEL=warn bundle exec rspec spec/lib/api/validations/validators 

On master you will see the deprecation warnings output, on this branch they shouldn't appear.

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 #415315 (closed)

Edited by Luke Duncalfe

Merge request reports

Loading