This directory contains tooling scripts and configurations for the submitqueue repository.
The tool/bazel script is a Python-based Bazelisk implementation that:
- Reads
.bazelversionfrom the repository root - Automatically downloads and caches the correct Bazel version
- Delegates all commands to that version
# Use the wrapper directly
./tool/bazel build //...
# Or add tool/ to your PATH (via .envrc with direnv)
bazel build //...The Bazel version is controlled by .bazelversion at the repository root. Update that file to change the Bazel version used by the wrapper.
tool/gitsandbox creates the bare repository that make local-submitqueue-start PROVIDER=git merges into. It runs before the stack starts, because Runway clones that repository at boot and fails if the target does not already exist. The result is one seed commit on the target branch. Running it again leaves an existing repository unchanged, so a restart keeps commits that earlier runs landed. The Makefile invokes it; bazel run //tool/gitsandbox -- -sandbox-dir <dir> is the direct form.
tool/proto is the Bazel codegen for the committed protobuf Go stubs. make proto builds //tool/proto:generated and copies each package's output into its protopb/ directory. The package list and per-source outputs live in tool/proto/BUILD.bazel. Change the .proto sources and regenerate; do not edit the generated files. make clean-proto removes those stubs, and make proto writes them again.
tool/linter holds the checkers behind make lint. Each one is a small program with its own Makefile target:
licenseheaderchecks Apache license headers (make lint-license);make license-fixwrites missing ones.binaryfilefails when a binary file is tracked (make lint-binary).messageidfails when a queue message is constructed outsideplatform/publishand the queue backends (make lint-message-id).queueshardfails when a schema's primary key does not lead with its shard column, or a secondary index reaches across shards (make lint-queue-shard).
When adding new tools to this directory:
- Create the script in
tool/ - Make it executable:
chmod +x tool/<script-name> - Add it to
tool/BUILD.bazelif it needs to be referenced by Bazel rules - Document it in this README
This directory is added to PATH via .envrc (for direnv users), allowing you to run bazel commands without prefixing with ./tool/.