Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 38 additions & 18 deletions .github/workflows/bazel-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Bazel patch compatibility (Cargo)
# The Cargo flows of the real-Bazel tests (`cargo::` in `e2e_bazel_build`):
# hosted and vendored mode for a crate that rules_rust's crate_universe
# resolves from a Cargo workspace (`crate.from_cargo`, with the project's
# cargo config and no cargo-bazel lock), and hosted mode on the hub that
# names no cargo config, on each Bazel release below.
# cargo config and no cargo-bazel lock), hosted mode on the hub that names
# no cargo config, and agent mode for the copy of the crate in a cargo
# home, on each Bazel release below.
# bazel-compatibility.yml holds the legs and what every ecosystem shares;
# this file says when the Cargo legs run and on which releases.
#
Expand All @@ -16,9 +17,9 @@ name: Bazel patch compatibility (Cargo)
# it comes to about 230 MB after one Bazel release and about 240 MB once
# both releases of the era have used it, and to about 155 MB for the era of
# 0.56.0 (macOS arm64). Every workspace copy unpacks the toolchain for
# itself, about 1.8 GB, and a leg has two at a time, one per test: a test
# removes its first copy before its second machine builds (3.6 GB at the
# peak on Bazel 9.3.2, macOS arm64).
# itself, about 1.8 GB, and a leg has two at a time, one per test that
# runs: a test removes its first copy before its second machine builds
# (3.6 GB at the peak on Bazel 9.3.2, macOS arm64).
#
# No leg asks crates.io about the crate under test. cargo-bazel's cargo
# reads no downloader config, so the test's workspace names a mirror of
Expand Down Expand Up @@ -47,25 +48,30 @@ on:
# source replacement (formats/cargo/), the vendored backend
# (vendor/cargo*, the lock inventory), the upstream restore of
# `rollback`, the crawler every `scan` starts, the cargo home and
# workspace lookups, and the reader of a Cargo project that `vex` runs
# (vex/discover/cargo.rs). They also match Cargo files no flow runs
# (agent mode's sidecars and build cache), which are no other
# ecosystem's either. One more file is here for what the flows
# workspace lookups, the reader of a Cargo project that `vex` runs
# (vex/discover/cargo.rs), and the Cargo files of agent mode (its
# sidecars and build cache). One more file is here for what the flows
# run through: patch/user_patches.rs, the inspection of the project's
# own patches, which reads the Cargo.toml and the cargo config of every
# scan. That file also holds the npm, Composer and Go parts of the
# gate, so a change to those starts the Cargo legs too. The globs name
# that one crate, so no bench fixture is here, and nothing another
# ecosystem's flow owns: a change to one ecosystem starts that
# ecosystem's legs only.
# that one crate, so no bench fixture is here. Last, the VEX code:
# `vex/` of the core, the files of the `vex` command, and of `bazel/`
# of the core the reader of the workspace files (mod.rs, starlark.rs,
# workspace.rs, and rc.rs, which bazel/cargo.rs reads) and built.rs,
# which says what a hub builds. The agent flow holds the exact
# document socket-patch writes about its build, so a change to how a
# document is built or worded starts the legs of every ecosystem.
# Nothing else that another ecosystem's flow owns is here: any other
# change to one ecosystem starts that ecosystem's legs only.
#
# What it does not cover: shared engine code (patch/redirect/mod.rs,
# the rest of vendor/, hosted/, commands/), the shared test helpers and
# the toolchain files. A change there 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. On demand, workflow_dispatch runs the legs on
# any branch.
# the rest of vendor/, hosted/, the rest of commands/, the apply engine
# of agent mode), the shared test helpers and the toolchain files. A
# change there 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. On demand, workflow_dispatch runs the legs on any branch.
paths:
- '.github/workflows/bazel-cargo.yml'
- '.github/workflows/bazel-compatibility.yml'
Expand All @@ -77,6 +83,13 @@ on:
- 'crates/socket-patch-core/src/**/*cargo*'
- 'crates/socket-patch-core/src/**/*cargo*/**'
- 'crates/socket-patch-core/src/patch/user_patches.rs'
- 'crates/socket-patch-core/src/bazel/built.rs'
- 'crates/socket-patch-core/src/bazel/mod.rs'
- 'crates/socket-patch-core/src/bazel/rc.rs'
- 'crates/socket-patch-core/src/bazel/starlark.rs'
- 'crates/socket-patch-core/src/bazel/workspace.rs'
- 'crates/socket-patch-core/src/vex/**'
- 'crates/socket-patch-cli/src/commands/vex*.rs'
push:
branches: [main]
# The pull request paths, and what only a push to main covers: the
Expand All @@ -96,6 +109,13 @@ on:
- 'crates/socket-patch-core/src/**/*cargo*'
- 'crates/socket-patch-core/src/**/*cargo*/**'
- 'crates/socket-patch-core/src/patch/user_patches.rs'
- 'crates/socket-patch-core/src/bazel/built.rs'
- 'crates/socket-patch-core/src/bazel/mod.rs'
- 'crates/socket-patch-core/src/bazel/rc.rs'
- 'crates/socket-patch-core/src/bazel/starlark.rs'
- 'crates/socket-patch-core/src/bazel/workspace.rs'
- 'crates/socket-patch-core/src/vex/**'
- 'crates/socket-patch-cli/src/commands/vex*.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/main.rs'
- 'crates/socket-patch-core/src/patch/redirect/**'
- 'crates/socket-patch-core/src/vendor/**'
Expand Down
67 changes: 41 additions & 26 deletions .github/workflows/bazel-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Bazel patch compatibility (NuGet)

# The NuGet flows of the real-Bazel tests (`nuget::` in `e2e_bazel_build`):
# hosted mode for a package that rules_csharp's `nuget.from_lock` reads from
# `packages.lock.json` and `nuget.config`, and for a tag that names no
# `nuget_config`, on each Bazel release below.
# `packages.lock.json` and `nuget.config`, for a tag that names no
# `nuget_config`, and agent mode for the copy of the package in NuGet's
# global packages folder, on each Bazel release below.
# bazel-compatibility.yml holds the legs and what every ecosystem shares;
# this file says when the NuGet legs run and on which releases.
#
Expand All @@ -27,34 +28,41 @@ name: Bazel patch compatibility (NuGet)
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# What a pull request run covers: the NuGet flow and its fixture, the
# What a pull request run covers: the NuGet flows and their fixture, the
# harness and the workflows that run it, the Bazel installer and its
# pins, and the NuGet files of the product that `scan --mode hosted`,
# `vex` and `rollback` run through in the fixture, each by its own
# path: the readers of `packages.lock.json` and `nuget.config` and the
# `contentHash` of a package (formats/nuget), the NuGet crawler, which
# finds a package in the global packages folder, the reader of the
# NuGet settings a project inherits (vendor/nuget_config.rs), the
# discovery of a hosted pin in the two files, the upstream restore of
# `rollback`, and the hosted scan's check of that folder. Then what
# reads the tag in `MODULE.bazel`: the reader of the workspace files,
# which every ecosystem's flow shares (bazel/mod.rs, starlark.rs and
# workspace.rs), and what hosted mode makes of the tag (bazel/nuget.rs).
# `scan --mode agent`, `vex` and `rollback` run through in the fixture,
# each by its own path: the readers of `packages.lock.json` and
# `nuget.config` and the `contentHash` of a package (formats/nuget), the
# NuGet crawler, which finds a package in the global packages folder,
# the reader of the NuGet settings a project inherits
# (vendor/nuget_config.rs), the discovery of a hosted pin in the two
# files, the upstream restore of `rollback`, and the hosted scan's check
# of that folder. Then what reads the tag in `MODULE.bazel`: the reader
# of the workspace files, which every ecosystem's flow shares
# (bazel/mod.rs, starlark.rs and workspace.rs), and what hosted mode
# makes of the tag (bazel/nuget.rs).
# vendor/nuget_feed.rs is the vendored backend; it is here for the
# version and folder helpers that every one of those files calls.
# Nothing else that another ecosystem's flow owns is here, so any other
# change to one ecosystem starts that ecosystem's legs only.
# patch/sidecars/nuget.rs is what agent mode does to a package in
# NuGet's folder beyond its files. Last, the VEX code: `vex/` of the
# core, the files of the `vex` command, and what `vex` makes of the tag
# (bazel/built.rs, which says what the hub of each ecosystem builds).
# The agent flow holds the exact document socket-patch writes about its
# build, so a change to how a document is built or worded starts the
# legs of every ecosystem. Nothing else that another ecosystem's flow
# owns is here: any other change to one ecosystem starts that
# ecosystem's legs only.
#
# What it does not cover: shared engine code. The hosted rewrite itself
# is there (`rewrite_nuget` in patch/redirect/mod.rs, the file of every
# ecosystem's rewriter), and so are patch/redirect/grant.rs,
# hosted/engine.rs, commands/scan/hosted.rs and the rest of vex/, the
# shared test helpers and the toolchain files. 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 agent mode (patch/sidecars/nuget.rs), which is in neither
# list. On demand, workflow_dispatch runs the legs on any branch.
# hosted/engine.rs, commands/scan/hosted.rs, the apply engine of agent
# mode, the shared test helpers and the toolchain files. 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. On demand, workflow_dispatch runs the legs on any branch.
paths:
- '.github/workflows/bazel-nuget.yml'
- '.github/workflows/bazel-compatibility.yml'
Expand All @@ -70,18 +78,22 @@ on:
- 'crates/socket-patch-core/src/vex/discover/nuget.rs'
- 'crates/socket-patch-core/src/patch/redirect/upstream/nuget.rs'
- 'crates/socket-patch-cli/src/commands/scan/hosted/nuget.rs'
- 'crates/socket-patch-core/src/bazel/built.rs'
- 'crates/socket-patch-core/src/bazel/mod.rs'
- 'crates/socket-patch-core/src/bazel/nuget.rs'
- 'crates/socket-patch-core/src/bazel/starlark.rs'
- 'crates/socket-patch-core/src/bazel/workspace.rs'
- 'crates/socket-patch-core/src/patch/sidecars/nuget.rs'
- 'crates/socket-patch-core/src/vex/**'
- 'crates/socket-patch-cli/src/commands/vex*.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 shared engine code and test helpers the flow runs
# through, `vex`, whose verdicts the flow asserts, and the toolchain
# files. A main push outside this list waits for the nightly run below.
# pull request), the shared engine code and test helpers the flows run
# through, and the toolchain files. A main push outside this list waits
# for the nightly run below.
paths:
- '.github/workflows/bazel-nuget.yml'
- '.github/workflows/bazel-compatibility.yml'
Expand All @@ -97,14 +109,17 @@ on:
- 'crates/socket-patch-core/src/vex/discover/nuget.rs'
- 'crates/socket-patch-core/src/patch/redirect/upstream/nuget.rs'
- 'crates/socket-patch-cli/src/commands/scan/hosted/nuget.rs'
- 'crates/socket-patch-core/src/bazel/built.rs'
- 'crates/socket-patch-core/src/bazel/mod.rs'
- 'crates/socket-patch-core/src/bazel/nuget.rs'
- 'crates/socket-patch-core/src/bazel/starlark.rs'
- 'crates/socket-patch-core/src/bazel/workspace.rs'
- 'crates/socket-patch-core/src/patch/sidecars/nuget.rs'
- 'crates/socket-patch-core/src/vex/**'
- 'crates/socket-patch-cli/src/commands/vex*.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/main.rs'
- 'crates/socket-patch-core/src/patch/redirect/**'
- 'crates/socket-patch-core/src/hosted/**'
- 'crates/socket-patch-core/src/vex/**'
- 'crates/socket-patch-cli/src/commands/**'
- 'crates/socket-patch-cli/tests/common/**'
- 'crates/socket-patch-cli/tests/hosted_memory_common/**'
Expand Down
Loading
Loading