-
Notifications
You must be signed in to change notification settings - Fork 461
Ruby Update
How to make a Ruby version update happening.
- Create a link to the ruby package you want to use from devel:languages:ruby
- Make sure it builds at least for the distribution we use on production
There is a ruby configuration section at the bottom of the prjconf. It defines which ruby version the rubygem packages in O:S:U are built for. We only ever build things for one ruby version.
- Adopt all the versioned macros
- rebuild of the rubygem packages, make sure they succeed
Find (grep -Hril ruby.ruby2.5) and replace all interpreter locations you find for the old version with the new version.
Install the new ruby interpreter in your dev-env and try to boot the app. Fix any problems...
docker-compose run --rm --service-ports frontend /bin/bash -l
...
frontend@4757397d3caa:/obs/src/api> sudo zypper rm '*ruby*'
...
frontend@4757397d3caa:/obs/src/api> sudo zypper in ruby4.0-devel
...
frontend@4757397d3caa:/obs/src/api> bundle.ruby3.1 -v # Set this in Gemfile.lock "BUNDLED WITH"
...
frontend@4757397d3caa:/obs/src/api> bundle.ruby3.1 install
...
frontend@4757397d3caa:/obs/src/api> bundle.ruby.ruby3.1 exec rspec
...
Fix what needs to be fixed.
Once you are reasonably sure you have a working code base again:
- adopt the frontend container to use/setup the new Ruby interpreter version.
- send all your code changes from above as PR, the CI will use the adopted container
Now comes the tricky part...
Adopt the Ruby interpreter version in
dist/obs-server.specdist/obs-bundled-gems.spec
and make them build.
Once obs-api is building, our test instance will automatically install it.
You need to adopt some files:
- Update the ruby version in
/etc/apache2/conf.d/mod_passenger.conf - Update the ruby version in
/root/.bashrc
Once this works, move on to production.
Repeat what you had to do on the test instance and deploy everything. Good luck!
- Development Environment Overview
- Development Environment Tips & Tricks
- Spec-Tips
- Code Style
- Rubocop
- Testing with VCR
- Test in kanku
- Authentication
- Authorization
- Autocomplete
- BS Requests
- Events
- ProjectLog
- Notifications
- Feature Toggles
- Build Results
- Attrib classes
- Flags
- The BackendPackage Cache
- Maintenance classes
- Cloud uploader
- Delayed Jobs
- Staging Workflow
- StatusHistory
- OBS API
- Owner Search
- Search
- Links
- Distributions
- Repository
- Data Migrations
- Package Versions
- next_rails
- Ruby Update
- Rails Profiling
- Remote Pairing Setup Guide
- Factory Dashboard
- osc
- Setup an OBS Development Environment on macOS
- Run OpenQA smoketest locally
- Responsive Guidelines
- Importing database dumps
- Problem Statement & Solution
- Kickoff New Stuff
- New Swagger API doc
- Documentation and Communication
- GitHub Actions
- Brakeman
- How to Introduce Software Design Patterns
- Query Objects
- Services
- View Components
- RFC: Core Components
- RFC: Decorator Pattern
- RFC: Backend models
- RFC: Hotwire Turbo Frames Pattern