Upgrade Grape from 2.0.0 to 2.4.x
Upgrade the Grape gem from `~> 2.0.0` to `~> 2.4.x`, resolving all ecosystem blockers and making code forward-compatible for an eventual `3.x` upgrade. Strategy: make all code forward-compatible first (Phase 0+1), then bump Grape to 2.4 with grape_logging 3.0.0 in lockstep (Phase 2+3). Validated via dual-boot CI. ## Phases - **Phase 0 — Blocker Resolution**: resolve ecosystem gem incompatibilities (`gitlab-grape-openapi`, `grape-path-helpers`, `grape-swagger`, `otel-grape`, `grape_logging`) and set up dual-boot CI. All items are parallelizable. - **Phase 1 — Forward-Compatible Code Changes**: refactor GitLab code to use APIs that work on both Grape `2.0` and `2.4+` (`rack_response`, `namespace_inheritable`, `validators`, `coerce_nil_params`). No version bump yet. - **Phase 2 — Version Bump + Validation**: bump Grape to `2.4` and `grape_logging` to `3.0.0` in lockstep, then validate with the full CE+EE API spec suite, OpenAPI generation, auth flows, observability, and benchmarks. - **Phase 3 — Cleanup**: remove dual-boot infrastructure, legacy workarounds, and update documentation. ## Execution Flow > **Note**: time estimates below are very rough and subject to change as work progresses. ``` Weeks 1-3: Phase 0 (all parallel) + Phase 1 (all parallel) Week 4-5: Complete remaining MRs, dual-boot green, auth flag rollout --- GATE: all forward-compat merged, dual-boot green, auth flag at 100% --- Week 6-8: Phase 2 (bump + validate + stabilize) Week 9-10: Phase 3 (cleanup) ``` Estimated total: 12-14 MRs across 8-10 weeks. ## DRI @abignotti ## Context Detailed migration plan: https://gitlab.com/gitlab-org/gitlab/-/work_items/593466#note_3191493330 <!-- STATUS NOTE START --> ## Status 2026-07-02 Work to fix issues that were not found during planning is ongoing, the number of issues has decreased dramatically and we should be close to completion :tm: :clock1: **total hours spent this week by all contributors**: 32 :tada: **achievements**: * Finding and fixing unforeseen issues during planning, by iterating: * Running the complete CI pipeline with Grape 2.4 * Finding failures with the help of AI (the logs are _many_ and _huge_) * Opening new issues in this epic under "Phase 1b" * Picking up an issue and fixing it :issue-blocked: **blockers**: * :arrow_forward: **next**: * Continue finding and fixing unforeseen issues during planning _Copied from https://gitlab.com/groups/gitlab-org/quality/-/epics/385#note_3515181931_ <!-- STATUS NOTE END -->
epic