New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci] fix CI by replacing deprecated Xcode versions, and add Xcode 14, Xcode 15, and Ruby 3.1 to test envs #21465
Conversation
Let's wait. |
The reason those specs are failing is because the current version of Rubocop doesn't support Ruby 3.1, so it needs to be upgraded (it's currently frozen at a specific old version). Upgrading it requires a lot of changes throughout the codebase 😅 or adding them as 'todo'... |
Reviewed 1 rule being applied and then added the remaining of them to the Rubocop TODO file via |
Generated by 🚫 Danger |
This reverts commit e122484.
… gem." This reverts commit fda2881.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-reviewed 👍
fastlane.gemspec
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These diffs look huge but 99% of the changes I made was just sorting the gems alphabetically 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending the MFA changes.
The biggest thing to happen to fastlane… since fastlane
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
The goal of this PR is to fix CI (
master
doesn't build) and update the Xcode versions where our tests are run.Description
master
is failing because it still tries to use old (now unsupported) envs:Example of failing builds:
These are the supported envs currently:
https://circleci.com/docs/using-macos/
After setting the new versions of Xcode and their respective Ruby versions, I realized that there are other indirect dependencies that either gets updated (Ruby's
openssl
) or need to be updated (http-cookie
, used by Faraday), so some further changes needed to take place in the rspecs and dependency versions.I don't understand how the specs were passing on Ruby 3.1 in other environments🤔CLICK ME to understand "how come Ruby 3.1 was working before and it suddenly broke?"
Some context regarding Ruby 3.1... This wasn't the first Ruby 3.1 image to be used and now it got broken, so I was wondering "how come this was working before and it suddenly broke?"
Turns out that for Ruby 3.0, CircleCI used to work fine (build 1), and by using an identifier such as
3.0
it would set ruby version to the latest3.0.*
,3.0.2
in this case. But for Ruby 3.1, CircleCI used to fail silently 😅 (build 2), and then it would default to Ruby 2.7.x (whatever the default of the machine was).So the reality is that apparently we never ran CI on Ruby 3.1, hence why I'm finding some long-broken things when running on Ruby 3.1 (e.g.
openssl
got updated in Ruby 3.1 and this breaks stuff).On top of that, the behavior of "setting
3.0
, and it installing the closest known version e.g.3.0.2
" that used to work, no longer works AFAICT. I set Ruby3.1
and3.2
and it didn't recognize it (build 3), but when I set3.1.2
(which is the version I saw that is installed in CircleCI's image), it installed correctly (build 4).So these are the reasons why the old "3.1" identifier used to work (cuz it'd fail silently and fallback to 2.7.x), and why the "3.0" identifier used to work (because it'd automatically pick 3.0.2, but it no longer does that)
Resources
OpenSSL::PKey::EC
: https://ruby-doc.org/stdlib-3.1.0/libdoc/openssl/rdoc/OpenSSL/PKey/EC.htmlhttp-cookie
on Ruby 3: Tests fail on http-cookie / ruby 3.0 sparklemotion/http-cookie#38Testing Steps
Just pass CI:
Screenshot taken from adac361