Update grpc to work with Ruby 3 (new)
We were already on a Ruby 3 compliant version of grpc via #331588 (closed), but had to revert this change due to #339138 (closed).
We are now back on 1.30.2, which does not work with Ruby 3. We have several options:
- Wait for a new upstream release that is both Ruby 3 compliant and fixes the SSE4 issue.
- Compile the Ruby 3 compliant 1.38+ from source without SSE4 instructions.
- Keep using 1.30.2 but fork or monkey-patch it to become Ruby 3 compliant.
I favor these options in the order listed. The best options is always to use official releases that we know to work well, but we do not know how soon the problem will be fixed and released upstream. The issue is here: https://github.com/grpc/grpc/issues/27095 (Stan's PR: https://github.com/grpc/grpc/pull/27121).
We are also contemplating 2, but depending on how quickly this is resolved upstream it might not be worth doing as it comes with a lot of extra setup work (we would have to change all production images, build images, and omnibus to compile grpc from source.)
I would try to avoid 3 since monkey patching or maintaining forks should always be the last resort IMO.
Update
We settled on option 1 and are now targeting the 1.42.0 release.
Rollout
Overall the expectation is that there should be no observable change before and after the rollout. Any increase in error rates or resource use would be considered a regression.
Pre-production checks
-
gitaly!4108 (merged) passes checks -
QA stage is green
-
-
!74987 (merged) passes checks -
QA stage is green -
Exploratory testing in review-app did not reveal any issues
-
-
(Gitaly MR reverted by gitaly!4172 (merged))Gitaly MR (TBD) is merged -
GitLab gem upgrade MR is merged -
Exploratory testing on staging did not reveal any issues
Canary checks
-
Source code integration on canaries is healthy -
gitaly dashboard shows no anomalies (apdex, error rates, CPU & memory utilization) -
gitaly logs -
gitlab logs
-
Final checks
-
Metrics from above show no anomalies on main stage
Rollback
If necessary, the change can be rolled back by reverting both MRs: