Ruby 3.1
Related epic: https://gitlab.com/groups/gitlab-org/-/epics/9684 While it would be nice to jump to Ruby 3.2, we should update to Ruby 3.1 first because: 1. Ruby 3.2 fixed a number of kwargs issues that may break current code. 2. Rails 7 has a number of fixes for Ruby 3.2: https://gitlab.com/groups/gitlab-org/-/epics/9684#note_1304991179. Let's not try to rush out changes that haven't been fully tested with Ruby 3.2. Besides, https://gitlab.com/groups/gitlab-org/-/epics/7875 seems like it's getting close. Test merge request: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114366 ## Ruby 3.0 EOL Ruby 3.0 is scheduled to be EOL on 2024-03-31 https://www.ruby-lang.org/en/downloads/branches/ ## Timeline for Ruby 3.1 rollout See: https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/1128#problem-statement ## DRIs | Area | DRI | |------|-----| | Overall coordination | @pjphillips | | Engineering | TBD | | Delivery | `@rpereira2` | | Quality Engineering | `@svistas` `@vincywilson` | | Distribution | `@balasankarc` | | Engineering Productivity | `@godfat-gitlab` | ## Changes https://rubyreferences.github.io/rubychanges/3.1.html * Hash literal value omission * Anonymous block argument * Pattern-matching: pinning of expressions * Time: better support for timezones in construction * Low-level IO::Buffer * More methods become async with fiber scheduler ## High level steps required * [x] Go through remaining blockers and split them up among contributors * [x] Make sure the topic-branch MR pipeline is green * [x] Go through https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114366 and extract commits into `master` until the MR can be closed (this can already happen in parallel with commits that are already backwards compatible with 3.0) * [x] Switch `NEXT_RUBY_VERSION` in CI pipelines to 3.1, maybe reintroduce labels so we can `pipeline:run-as-ruby31` or `run-as-ruby30` since that was very useful to have last time, and so that we have scheduled builds on master again for 3.1 * [x] Default devkits to 3.1 * [x] Audit gems for Ruby 3.1 https://gitlab.com/gitlab-org/gitlab/-/issues/404750 * [x] Run GPT to test performance https://gitlab.com/gitlab-org/gitlab/-/issues/427702 * [x] Swap pipelines from 3.0 to 3.1 https://gitlab.com/gitlab-org/gitlab/-/issues/427446+ * [x] If absolutely necessary, do some manual testing. https://gitlab.com/gitlab-org/gitlab/-/issues/429266 * [x] Start to work through https://gitlab.com/groups/gitlab-org/-/epics/11659+ * [x] Roll out to SaaS https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/1128+ * [x] Release to Self Managed in subsequent release
epic