Skip to content

Instantly share code, notes, and snippets.

@chadlwilson
Last active April 17, 2026 05:17
Show Gist options
  • Select an option

  • Save chadlwilson/2d64725ea4e9cdd00f565c7c4dfbb284 to your computer and use it in GitHub Desktop.

Select an option

Save chadlwilson/2d64725ea4e9cdd00f565c7c4dfbb284 to your computer and use it in GitHub Desktop.

1. Change the core version used for build (Adding new Ruby support)

  • Change ruby version in mise.toml locally
  • Update rake-compiler-dock version (usually required for new Ruby versions for cross-compile support)
    • main grpc.gemspec
    • templates/grpc.gemspec.template
    • docker images third_party/rake-compiler-dock
      • These will need to be rebuilt and pushed by a Googler; but you can still test locally.
  • Change the default version to the new version in prepare_build_linux_ruby_artifact_rc
  • Add new minor version to Rakefile target_ruby_minor_versions for cross-compiles

Test build

rm -f Gemfile.lock && bundle install && rake

2. Update testing images (Adding / Dropping)

  • Add/remove templates at templates/tools/dockerfile/distribtest/ruby-*
    • Adding new Ruby compat
      • Create new templates for the new minor version. Note there are templates for both Dockerfile and some includes.
    • Dropping Ruby compat
      • Remove templates for the EOLed version
      • Update the references to the minimum supported version
  • Rebuild testing docker images
    LOCAL_ONLY_MODE=true tools/dockerfile/push_testing_images.sh
  • Should see changes to the *.current_version files for the rebuilt images that lock the various images
    • You can commit these. They need to be rebuilt, pushed and overridden by a Googler, but that's no issue - grpc squashes commits on merge anyway.
    • Committing these can make it clear what you've tested rebuilding locally and allow using the images locally for later task_runner.py tests, where necessary.

3. Testing

Gem cross-compiles

Test native build for ones which will run fastest locally

bundle exec rake clean 'gem:native[x86_64-darwin]'
bundle exec rake clean 'gem:native[arm64-linux-gnu]'
bundle exec rake clean 'gem:native[arm64-linux-musl]'
bundle exec rake clean 'gem:native[arm64-darwin]'
bundle exec rake clean 'gem:native[aarch64-linux-gnu]'
bundle exec rake clean 'gem:native[aarch64-linux-musl]'

Running artifact tests via task_runner infra (same as build)

task_runner: Build all locally like the tests (optional?)

tools/run_tests/task_runner.py -f artifact linux ruby presubmit aarch64-linux-gnu -j 10 --inner_jobs 10
tools/run_tests/task_runner.py -f artifact linux ruby presubmit

Running distribution tests via task_runner infra (same as build)

task_runner: Run distribtests locally (can comment out platforms or use filters)

tools/run_tests/task_runner.py -f distribtest linux ruby presubmit aarch64-linux-gnu -j 10 --inner_jobs 10
tools/run_tests/task_runner.py -f distribtest linux ruby presubmit

Extra things?

Run tests (locally - may fail?)

tools/run_tests/run_tests.py -l ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment