Route Bazel CI through shared BuildBuddy remote config wrapper#25156
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67fae88400
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1df12acf01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91db5b42e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
91db5b4 to
d92d74f
Compare
|
@anp-oai err
Can/should we recommend |
|
Upon further inspection, let's use https://developers.openai.com/codex/app/local-environments to deal with Incidentally, we should consider whether |
|
|
||
| if [[ $# -ne 1 ]]; then | ||
| echo "Usage: $0 [--windows-cross-compile] [<bazel query args>...] -- <query expression>" >&2 | ||
| if [[ $# -lt 2 || "${@: -2:1}" != "--" ]]; then |
There was a problem hiding this comment.
Yep, this file is definitely a candidate for a Python rewrite in a follow-up PR...
Why
Bazel remote configuration was selected in several CI scripts and workflow steps. That made the BuildBuddy tenant policy easy to duplicate and harder to audit, especially for fork pull requests that must not use the OpenAI tenant.
This builds on sluongng/buildbuddy-ci-host-routing and consolidates the policy in one place.
What to do if this breaks you
See
codex-rs/docs/bazel.mdfor details. TLDR:~/.bazelrccommon --config=buildbuddy-openai-rbetouser.bazelrcin the repo rootRun
just bazel-testto ensure it works.Note that
just bazel-remote-testno longer exists, you need to select a remote configuration as documented to use RBE.What changed
.github/scripts/run_bazel_with_buildbuddy.pyas the shared Bazel wrapper and Python library. It selects the OpenAI host only for trusted upstream GitHub Actions runs, routes keyed fork runs to the generic host, and falls back to local Bazel execution when no key is available..bazelrcconfigurations and update Bazel CI, query helpers, andrusty_v8staging to use the shared policy. Loading-phase target-discovery queries remain local.rusty_v8unit coverage, plusjust test-scriptsfor the.github/scriptsPython tests.user.bazelrcsetup, BuildBuddy configurations, and CI behavior incodex-rs/docs/bazel.md.Validation
just test-scriptsbash -n .github/scripts/run-bazel-ci.sh .github/scripts/run-bazel-query-ci.sh .github/scripts/run-argument-comment-lint-bazel.sh scripts/list-bazel-clippy-targets.shpython3 -m py_compile .github/scripts/run_bazel_with_buildbuddy.py .github/scripts/test_run_bazel_with_buildbuddy.py .github/scripts/test_rusty_v8_bazel.py .github/scripts/rusty_v8_bazel.pyruff check .github/scripts/run_bazel_with_buildbuddy.py .github/scripts/test_run_bazel_with_buildbuddy.py .github/scripts/test_rusty_v8_bazel.py .github/scripts/rusty_v8_bazel.py