Activate Grape 2.4 dual-boot via Gemfile.next

What does this MR do and why?

Activates the dormant Gemfile.next dual-boot mechanism for the Grape 2.0 → 2.4 upgrade.

Adds an if next? guard so Gemfile.next resolves grape ~> 2.4 while the regular Gemfile keeps grape ~> 2.0.0. The gitlab-grape-openapi gemspec constraint is loosened from ~> 2.0.0 to ~> 2.0 to allow resolution under the next boot; a TODO comment marks it for tightening once the upgrade is complete.

To test Grape 2.4 compatibility on an MR, apply the pipeline:run-with-rails-next label. The entire pipeline will run with BUNDLE_GEMFILE=Gemfile.next, surfacing any incompatibilities.

Note: this approach relies on RUBY_VERSION_NEXT and RUBY_VERSION_DEFAULT being the same version (currently both 3.3.11 in .gitlab/ci/version.yml). If RUBY_VERSION_NEXT is ever bumped to a newer Ruby version before this upgrade is complete, the pipeline:run-with-rails-next pipeline would test Grape 2.4 under a different Ruby version, introducing a confounding variable. That should be accounted for at that point.

References

Related to: #596162 (closed)

Screenshots or screen recordings

How to set up and validate locally

Verify the next boot resolves Grape 2.4:

BUNDLE_GEMFILE=Gemfile.next bundle exec ruby -e "puts Gem.loaded_specs['grape'].version"
# => 2.4.0

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading