Skip to content

Fail fast on Grape API Ruby 3 deprecations

We are running code on our grape REST API code paths that uses deprecated syntax and breaks under Ruby 3.

We do not currently detect this on master via deprecation_toolkit, because these warnings appear to be swallowed by grape and rethrown at runtime via Grape::Entity::Deprecation: https://github.com/ruby-grape/grape-entity/blame/master/lib/grape_entity/entity.rb#L527

Perhaps we can find a way to fail this fast in CI before switching to Ruby 3, so as to minimize the chance that such errors are reintroduced before making the switch.

Example for failure: https://gitlab.com/gitlab-org/gitlab/-/jobs/1477045315

Edited by Matthias Käppler