Update supported Ruby version to 3.0.5
Ruby 3.0 was released on 2020-12-25: https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/ Ruby 2.7 EOL is expected to be March 2023 based on life expectancy of previous major releases, so runway is still significant. Still, we should get our code in line to work with Ruby 3.0 as breaking changes will accumulate over time. This effort is targeting [Ruby 3.0.5](https://www.ruby-lang.org/en/news/2022/11/24/ruby-3-0-5-released/), as [noted here](https://gitlab.com/groups/gitlab-org/-/epics/7875#note_1286662771). ### Highlights (bold text is mine) * Full separation of keyword arguments (**breaking change**) * Ractors: Thread-alike object implementing the actor model, and finally lifting the GVL (Global Virtual machine Lock) and enabling true concurrency * Non-blocking IO with Fibers * Type declarations (in separate files) * Pattern matching: * No longer experimental * Two flavors for one-line pattern matching: => (aka rightward assignment) and in (aka boolean check) * Find patterns * “Endless” methods * GC auto-compaction ### Related links * https://rubyreferences.github.io/rubychanges/3.0.html * Past upgrade effort in Ruby 2.7: https://gitlab.com/groups/gitlab-org/-/epics/2380 ### Current status **Join `#f_ruby3` (internal only) for ongoing updates.** **2023-01-16:** - We announced a set of firm dates for individual checkpoints all the way to the production release: https://gitlab.com/groups/gitlab-org/-/epics/9522#timeline-to-launch - We are still performing [exploratory testing](https://gitlab.com/gitlab-org/gitlab/-/issues/373015) on a Ruby 3 10k instance. So far, no new issues have been found. - We are fleshing out the [production rollout details](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/865). - We are going through [Ruby 3 adoption blockers](https://gitlab.com/groups/gitlab-org/-/epics/9522) to decide when we can make Ruby 3 the GDK default. - We created an epic to collect non-blocking or post-deploy work: https://gitlab.com/groups/gitlab-org/-/epics/9635 ### Approach #### [COMPLETE] Preparations Owner: ~"group::application performance" - [x] Get on Rails 6.1: https://gitlab.com/groups/gitlab-org/-/epics/5837 - [x] Detect deprecated calls in our **test suite** that will be errors in Ruby 3. - [x] Update all gems we know to not work with Ruby 3: https://gitlab.com/groups/gitlab-org/-/epics/6210 - [x] Add Ruby 3 builds to relevant system/library repos - [x] Track Rubyb 3 related deprecations on SaaS: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66815 * Puma: https://log.gprd.gitlab.net/goto/5a90f9e7dce516dda935e984c58a396c * Sidekiq: https://log.gprd.gitlab.net/goto/78961b7c5d18b7ebabc58821f74738cc - [x] Test branch has green build: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70798 #### [COMPLETE] Green Ruby 3 `master` pipeline - Epic: https://gitlab.com/groups/gitlab-org/-/epics/8101 - Est. milestone: %"15.7" - Owner: ~"Engineering Productivity" Primary blockers: - [x] Close CI/CD gaps left over from previous milestone: https://gitlab.com/gitlab-org/gitlab/-/issues/356115 - [x] Run Ruby 3 pipeline against `master` - [x] Scheduled 2-hourly pipeline running unit and integrations tests, notifying `#f_ruby3`: https://gitlab.com/gitlab-org/gitlab/-/issues/340298 - [x] Nightly QA end-to-end test pipeline in place: https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/1480 - [x] E2E tests are passing: https://gitlab.com/gitlab-org/gitlab/-/issues/377800 - [x] Build and deploy a Ruby 3 review app: https://gitlab.com/gitlab-org/gitlab/-/issues/382499 - [x] Regularly run all jobs for full test coverage: https://gitlab.com/gitlab-org/gitlab/-/issues/382497 #### [COMPLETE] Ruby 3 packaging and distribution - Epic: https://gitlab.com/groups/gitlab-org/-/epics/8102 - Est. milestone: %"15.6" - Owner: ~"group::distribution" Primary blockers: - [x] Omnibus Ruby 3 support: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6286 - [x] CNG Ruby 3 image: https://gitlab.com/gitlab-org/gitlab/-/issues/341590 - [x] (May be a no-op) Helm charts use Ruby 3: https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3430 #### Ruby 3 release **For ease of use, I have created a count-down checklist that you can subscribe to here:** https://gitlab.com/gitlab-org/gitlab/-/issues/362892. It provides a much condensed view of what needs to happen prior to launch. See https://gitlab.com/groups/gitlab-org/-/epics/9522#timeline-to-launch for specific dates; we only track milestones here. - Dev Epic: https://gitlab.com/groups/gitlab-org/-/epics/8104 - Infra Epic: https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/865 - Change management: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5494 - Est. milestone: %"15.10" - Owner: ~"group::application performance", ~"group::scalability", ~"group::delivery" #### Post-release cleanup & documentation There will be a number of things we can remove post-migration, such as Ruby 2 image definitions, dev kit Rubies etc. There will also be a number of non-blocking issues related to the upgrade, or upgrading non-essential services we run where a post-March due date could be acceptable. We should also update documentation and hold an async retrospective. - Epic: https://gitlab.com/groups/gitlab-org/-/epics/9635 - Est. milestone: %"15.11" - Owner: ~"group::application performance", others. <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
epic