Skip to content

ci: add Bazel RBE lane#19

Merged
haasonsaas merged 1 commit into
mainfrom
codex/bazel-rbe-agent-pm-20260516
May 16, 2026
Merged

ci: add Bazel RBE lane#19
haasonsaas merged 1 commit into
mainfrom
codex/bazel-rbe-agent-pm-20260516

Conversation

@haasonsaas
Copy link
Copy Markdown
Contributor

Summary

  • add Bazel 9/Bzlmod/rules_python wiring for the Python package, app binary, and pytest suite
  • add a repo-scoped Bazel RBE workflow gated by BAZEL_RBE_ENABLED and the evalops-agent-pm-rbe runner label
  • make greenlet an explicit dependency so async SQLAlchemy tests install consistently under uv and Bazel

Test plan

  • actionlint .github/workflows/ci.yml .github/workflows/bazel-rbe.yml
  • uv sync --all-extras && OPENAI_API_KEY=test-key DRY_RUN=true uv run pytest -q
  • make bazel-check
  • make bazel-test

@cursor
Copy link
Copy Markdown

cursor Bot commented May 16, 2026

PR Summary

Medium Risk
Moderate risk because it introduces new Bazel/Bzlmod build+test wiring and a new GitHub Actions workflow that uses a self-hosted remote-execution runner; failures will primarily affect CI rather than runtime behavior.

Overview
Adds a Bazel-based build/test lane with Bazel 9 + Bzlmod + rules_python, including BUILD.bazel targets for the service library, app binary, and a Bazel-driven pytest target with a custom tests/pytest_main.py entrypoint to set up temp dirs and test env.

Introduces a gated GitHub Actions workflow (bazel-rbe.yml) that runs Bazel Remote Build Execution smoke tests on a labeled self-hosted runner, plus supporting tooling/config (.bazelrc remote config, .bazelignore, bazel/platforms, Makefile targets, and scripts/run-bazel-rbe.sh to manage the SSH/IAP tunnel).

Updates dependency management to include a generated requirements_lock.txt for Bazel’s pip parsing and makes greenlet explicit in pyproject.toml to stabilize async SQLAlchemy installs; also ignores Bazel output dirs in .gitignore.

Reviewed by Cursor Bugbot for commit e3daf89. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit 82682c1 into main May 16, 2026
8 checks passed
@haasonsaas haasonsaas deleted the codex/bazel-rbe-agent-pm-20260516 branch May 16, 2026 05:18
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit e3daf89. Configure here.

Comment thread BUILD.bazel
":agent_pm",
":app_lib",
] + RUNTIME_DEPS + TEST_DEPS,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing pyproject.toml in Bazel test data attribute

High Severity

The py_test target's data attribute does not include pyproject.toml, but pytest_main.py passes -c str(repo_root / "pyproject.toml") to pytest.main. Under Bazel's sandboxed execution, only files in srcs or data are available in the runfiles tree. The missing file means pytest either errors out or runs without its config, losing the critical asyncio_mode = "auto" setting from [tool.pytest.ini_options], which would cause all async tests to fail.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e3daf89. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant