Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
5583e8f
Run the hosted Go flow on real Bazel in CI
mikolalysenko Nov 17, 2026
39893d3
Tighten the Bazel end-to-end harness after review
mikolalysenko Nov 17, 2026
2dce679
Test RubyGems hosted mode under rules_ruby on real Bazel
mikolalysenko Nov 17, 2026
b6564c0
Share the Bazel test harness across ecosystems, one workflow each
mikolalysenko Nov 17, 2026
56ed6ad
Merge branch 'bazel-small/01-go-hosted-cells' into bazel-small/04-rub…
mikolalysenko Nov 17, 2026
a1f591b
Use the shared harness in the RubyGems flow and tighten it after review
mikolalysenko Nov 17, 2026
442bb9f
Hold the scrubbed environment list in its test, and pick Bazel tests …
mikolalysenko Nov 17, 2026
52001f0
Merge branch 'bazel-small/01-go-hosted-cells' into bazel-small/04-rub…
mikolalysenko Nov 17, 2026
2f7b1c7
Compute the gem sums in the RubyGems flow without loading the shared …
mikolalysenko Nov 17, 2026
f1aa02b
Give the nightly Bazel run of the Go caller a concurrency group of it…
mikolalysenko Nov 17, 2026
840707f
Merge branch 'bazel-small/01-go-hosted-cells' into bazel-small/04-rub…
mikolalysenko Nov 17, 2026
fa284e1
Take the gem sums of the RubyGems Bazel flow from the run, not from t…
mikolalysenko Nov 17, 2026
1e90def
Merge main into bazel-small/04-rubygems-rules-ruby
claude Nov 17, 2026
467afbf
Merge remote-tracking branch 'origin/main' into bazel-small/04-rubyge…
mikolalysenko Nov 17, 2026
1fcf1f1
Merge remote-tracking branch 'origin/bazel-small/04-rubygems-rules-ru…
mikolalysenko Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions .github/workflows/bazel-ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: Bazel patch compatibility (RubyGems)

# The RubyGems flow of the real-Bazel tests (`ruby::` in `e2e_bazel_build`):
# hosted mode for a gem that rules_ruby's `ruby.bundle_fetch` reads from
# `Gemfile` and `Gemfile.lock`, on each Bazel release below.
# bazel-compatibility.yml holds the legs and what every ecosystem shares;
# this file says when the Ruby legs run and on which releases.
#
# Beyond what every leg needs, a Ruby leg downloads the prebuilt Ruby of
# bazel-contrib/portable-ruby from GitHub (about 90 MB on Linux) and the
# bundler gem from rubygems.org, both held by its repository cache. It
# downloads no JDK and needs none on the runner: rules_ruby's rules name a
# Java runtime toolchain that only JRuby uses, and the fixture registers
# one with nothing behind it. A gem under test never comes from the
# repository cache: the fixture names no `gem_checksums`, so rules_ruby
# gives Bazel no checksum for a gem, and Bazel looks a file up in that
# cache by its checksum only.
#
# Not required for merge: no `merge_group` trigger, and no job here is a
# `needs` of ci.yml's `ci-ok`.

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# What a pull request run covers: the RubyGems flow and its fixture, the
# harness and the workflows that run it, the Bazel installer and its
# pins, and the RubyGems files that `scan --mode hosted` and `rollback`
# run through in the fixture, each by its own path: the readers of a
# Bundler lock and a Gemfile with the lock half of the hosted rewrite
# (formats/gem), lock discovery, the lock inventory, the Ruby crawler
# (it says which lock Bundler loads), the upstream restore of
# `rollback`, and the stale-install guard that both commands end with.
# Nothing another ecosystem's flow owns is here, so a change to one
# ecosystem starts that ecosystem's legs only.
#
# What it does not cover: shared engine code. The other half of the
# hosted rewrite is there (`rewrite_gem` and its planner in
# patch/redirect/mod.rs, the file of every ecosystem's rewriter), and
# so are patch/redirect/grant.rs, hosted/engine.rs and
# commands/scan/hosted.rs, the shared test helpers and the toolchain
# files. vendor/gem.rs is the vendored backend, which the flow only
# borrows two readers of a `gem` line from. A change to one of those
# gets its run on the push to main (when the file is in the list below)
# or in the nightly run, not on the pull request: that is the price of
# not running every ecosystem's legs on every shared change. The flow
# does not run the native extension rebuild of agent mode
# (patch/gem_ext.rs, patch/gem_source.rs), which is in neither list. On
# demand, workflow_dispatch runs the legs on any branch.
paths:
- '.github/workflows/bazel-ruby.yml'
- '.github/workflows/bazel-compatibility.yml'
- 'scripts/install-bazel.sh'
- 'scripts/bazel-pins.txt'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/ruby.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/harness.rs'
- 'crates/socket-patch-cli/tests/fixtures/bazel/rules_ruby/**'
- 'crates/socket-patch-core/src/formats/gem/**'
- 'crates/socket-patch-core/src/vex/discover/gem.rs'
- 'crates/socket-patch-core/src/vendor/lock_inventory/gem.rs'
- 'crates/socket-patch-core/src/crawlers/ruby_crawler.rs'
- 'crates/socket-patch-core/src/patch/redirect/upstream/gem.rs'
- 'crates/*/src/**/gem_refresh.rs'
push:
branches: [main]
# The pull request paths, and what only a push to main covers: the
# root of the test target (it changes when an ecosystem's module is
# added; ci.yml builds the target and runs its hermetic tests on every
# pull request), the vendored backend, the shared engine code and test
# helpers the flow runs through, and the toolchain files. A main push
# outside this list waits for the nightly run below.
paths:
- '.github/workflows/bazel-ruby.yml'
- '.github/workflows/bazel-compatibility.yml'
- 'scripts/install-bazel.sh'
- 'scripts/bazel-pins.txt'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/ruby.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/harness.rs'
- 'crates/socket-patch-cli/tests/fixtures/bazel/rules_ruby/**'
- 'crates/socket-patch-core/src/formats/gem/**'
- 'crates/socket-patch-core/src/vex/discover/gem.rs'
- 'crates/socket-patch-core/src/vendor/lock_inventory/gem.rs'
- 'crates/socket-patch-core/src/crawlers/ruby_crawler.rs'
- 'crates/socket-patch-core/src/patch/redirect/upstream/gem.rs'
- 'crates/*/src/**/gem_refresh.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/main.rs'
- 'crates/socket-patch-core/src/vendor/gem.rs'
- 'crates/socket-patch-core/src/patch/redirect/**'
- 'crates/socket-patch-core/src/hosted/**'
- 'crates/socket-patch-cli/src/commands/**'
- 'crates/socket-patch-cli/tests/common/**'
- 'crates/socket-patch-cli/tests/hosted_memory_common/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'crates/*/Cargo.toml'
- 'rust-toolchain.toml'
- '.cargo/**'
schedule:
# Nightly, so a main change outside the push list still gets a run
# within a day. The macOS leg runs here and on demand only.
- cron: '47 4 * * *'
workflow_dispatch:

permissions:
contents: read

# The nightly run has a group of its own. A group holds one pending run, so
# in the group of main's pushes a second push would replace a nightly that
# waits behind the first, and the nightly is the only run with the macOS leg.
concurrency:
group: bazel-ruby-${{ github.event.pull_request.number || github.ref }}${{ github.event_name == 'schedule' && '-nightly' || '' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
ruby:
uses: ./.github/workflows/bazel-compatibility.yml
with:
eco: ruby
fixtures: rules_ruby/bzlmod
# One leg per line: a Bazel release, and the era of the fixture that
# `ruby::FIXTURE` gives it.
releases: >-
[
{"bazel": "9.3.2", "era": "e9"},
{"bazel": "8.8.2", "era": "e9"},
{"bazel": "7.7.2", "era": "e9"}
]
macos: >-
[
{"bazel": "9.3.2", "era": "e9"}
]
1 change: 1 addition & 0 deletions crates/socket-patch-cli/tests/e2e_bazel_build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ mod go;
mod harness;
mod npm;
mod pypi;
mod ruby;
Loading
Loading