Skip to content

Add vex --grype-config to list the VEX document in Grype's config #264

Add vex --grype-config to list the VEX document in Grype's config

Add vex --grype-config to list the VEX document in Grype's config #264

Workflow file for this run

name: Bazel patch compatibility (PyPI)
# The PyPI flows of the real-Bazel tests (`pypi::` in `e2e_bazel_build`):
# hosted and vendored mode for a package that rules_python's `pip.parse`
# resolves from a hashed `requirements.txt`, on each Bazel release below.
# bazel-compatibility.yml holds the legs and what every ecosystem shares;
# this file says when the PyPI legs run and on which releases.
#
# Beyond what every leg needs, a PyPI leg downloads the Python toolchain
# from github.com (a python-build-standalone release, held by its
# repository cache). No leg asks pypi.org: rules_python resolves the hubs
# of every module of the build, its own among them, and no cache holds an
# index page, so the test's downloader config answers every project page
# from the loopback stand-in and blocks the host. A wheel under test never
# comes from the repository cache: the test builds the wheels of a run with
# an id of that run, so no earlier run saved a file with their checksums.
#
# 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 PyPI flow and its fixture, the
# harness and the workflows that run it, the Bazel installer and its
# pins, the wheel builder the flow shares with the Python suites, and
# the PyPI files of the product that the flow runs through: the Python
# crawler, the requirements parser and its rewriter, the version
# comparison, the inventory of a requirements file (which lives beside
# vendored mode), the index lookup of `rollback`, and the Python parts
# of the hosted scan. They are named file by file: a `*pypi*` or
# `*python*` pattern would also match the benchmark fixtures, the rest
# of vendored mode and the files of the lock-file package managers
# (pdm, pipenv, poetry, uv), where this flow does no more than find
# that the project is not theirs. Three PyPI helpers that those files
# call, and that are no other project manager's own, are listed with
# them: the finder of a project's Python lock files, the spelling of a
# version in a wheel's file name, and the hosted scan's check of an
# installed wheel. Last, the VEX code: `vex/` of the core, the files of
# the `vex` command, and `bazel/` of the core, which reads the workspace
# files and decides whether Bazel builds what was patched. Every flow
# holds the exact document socket-patch writes about its build, patched
# or not, 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, so 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 hosted/ and of 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.
paths:
- '.github/workflows/bazel-pypi.yml'
- '.github/workflows/bazel-compatibility.yml'
- 'scripts/install-bazel.sh'
- 'scripts/bazel-pins.txt'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/pypi.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/harness.rs'
- 'crates/socket-patch-cli/tests/fixtures/bazel/rules_python/**'
- 'crates/socket-patch-cli/tests/common/patched_wheel.rs'
- 'crates/socket-patch-cli/src/commands/pypi_reinstall.rs'
- 'crates/socket-patch-cli/src/commands/scan/hosted/python.rs'
- 'crates/socket-patch-core/src/crawlers/python_crawler.rs'
- 'crates/socket-patch-core/src/hosted/wheel_record.rs'
- 'crates/socket-patch-core/src/patch/redirect/requirements.rs'
- 'crates/socket-patch-core/src/patch/redirect/upstream/pypi.rs'
- 'crates/socket-patch-core/src/utils/pep440.rs'
- 'crates/socket-patch-core/src/utils/python_lock.rs'
- 'crates/socket-patch-core/src/utils/requirements.rs'
- 'crates/socket-patch-core/src/vendor/lock_inventory/pypi.rs'
- 'crates/socket-patch-core/src/vendor/pypi_distribution.rs'
- 'crates/socket-patch-core/src/vendor/pypi_requirements.rs'
- 'crates/socket-patch-core/src/vendor/pypi_wheel.rs'
- 'crates/socket-patch-core/src/vex/discover/pypi_other.rs'
- 'crates/socket-patch-core/src/bazel/**'
- '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, and the toolchain files. A main push outside this list waits
# for the nightly run below.
paths:
- '.github/workflows/bazel-pypi.yml'
- '.github/workflows/bazel-compatibility.yml'
- 'scripts/install-bazel.sh'
- 'scripts/bazel-pins.txt'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/pypi.rs'
- 'crates/socket-patch-cli/tests/e2e_bazel_build/harness.rs'
- 'crates/socket-patch-cli/tests/fixtures/bazel/rules_python/**'
- 'crates/socket-patch-cli/tests/common/patched_wheel.rs'
- 'crates/socket-patch-cli/src/commands/pypi_reinstall.rs'
- 'crates/socket-patch-cli/src/commands/scan/hosted/python.rs'
- 'crates/socket-patch-core/src/crawlers/python_crawler.rs'
- 'crates/socket-patch-core/src/hosted/wheel_record.rs'
- 'crates/socket-patch-core/src/patch/redirect/requirements.rs'
- 'crates/socket-patch-core/src/patch/redirect/upstream/pypi.rs'
- 'crates/socket-patch-core/src/utils/pep440.rs'
- 'crates/socket-patch-core/src/utils/python_lock.rs'
- 'crates/socket-patch-core/src/utils/requirements.rs'
- 'crates/socket-patch-core/src/vendor/lock_inventory/pypi.rs'
- 'crates/socket-patch-core/src/vendor/pypi_distribution.rs'
- 'crates/socket-patch-core/src/vendor/pypi_requirements.rs'
- 'crates/socket-patch-core/src/vendor/pypi_wheel.rs'
- 'crates/socket-patch-core/src/vex/discover/pypi_other.rs'
- 'crates/socket-patch-core/src/bazel/**'
- '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-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: '37 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-pypi-${{ github.event.pull_request.number || github.ref }}${{ github.event_name == 'schedule' && '-nightly' || '' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
pypi:
uses: ./.github/workflows/bazel-compatibility.yml
with:
eco: pypi
fixtures: rules_python/bzlmod
# One leg per line: a Bazel release, and the era of the fixture that
# `pypi::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"}
]