Drop reinstallation of google-protobuf and grpc in Gitaly gems
What does this MR do?
Previously when we supported CentOS 6 and other older operating
systems it made sense to recompile google-protobuf and grpc since
native gems are not compatible with these platforms. Native gems are
usually built with rake-compiler-dock
, which uses the
manylinux2014_x86_64
Docker image. As
https://github.com/pypa/manylinux#manylinux2014-centos-7-based shows,
these images are based on CentOS 7. Thus any native gem that needs
to work on older operating systems may not work.
However, since Cloud Native GitLab builds currently against Debian
bullseye and UBI 8.5, there is no need to force a recompliation of
native gems. Dropping the BUNDLE_FORCE_RUBY_PLATFORM=true
flag
allows bundle install
to use native gems. This significantly speeds
up build times, as gRPC takes 15-20 minutes to recompile. This also
removes the need to install xz-utils
for Nokogiri.
b4bebce0 introduced this flag in 2017, presumably because we reinstall google-protobuf and grpc in Omnibus to support CentOS 6. However, we only used this flag for the Gitaly container. The Rails and Sidekiq containers also have been using the google-protobuf and grpc native gems for years. We've unwittingly conducted an A/B test that demonstrates that these native gems work fine without recompilation.
Related issues
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Integration tests added to GitLab QA -
The impact any change in container size has should be evaluated