Skip to content

test: move virtual-deps/django rules_python tests out of root MODULE - #1421

Merged
jbedard merged 1 commit into
mainfrom
mv-rules_python-to-e2e
Aug 13, 2026
Merged

test: move virtual-deps/django rules_python tests out of root MODULE#1421
jbedard merged 1 commit into
mainfrom
mv-rules_python-to-e2e

Conversation

@jbedard

@jbedard jbedard commented Aug 12, 2026

Copy link
Copy Markdown
Member

Reduce usage of rules_python and heavy pip parsing in root MODULE.

Changes are visible to end-users: no

Test plan

  • Covered by existing test cases

@jbedard
jbedard requested a review from xangcastle August 12, 2026 20:10
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9186e8c6-b8ed-4f5e-95c6-b5ede7059882

📥 Commits

Reviewing files that changed from the base of the PR and between 26ac580 and 33649d5.

📒 Files selected for processing (2)
  • e2e/rules-python-interop/virtual-deps/django/BUILD.bazel
  • e2e/rules-python-interop/virtual-deps/django/requirements.txt
🚧 Files skipped from review as they are similar to previous changes (2)
  • e2e/rules-python-interop/virtual-deps/django/BUILD.bazel
  • e2e/rules-python-interop/virtual-deps/django/requirements.txt

📝 Walkthrough

Walkthrough

The change moves third-party dependency handling to uv, adds a Django pip hub and pinned wheel override, and introduces a Django project fixture with management, ASGI, WSGI, and version-validation support.

Changes

Django virtual dependency flow

Layer / File(s) Summary
Dependency resolution and override wiring
MODULE.bazel, e2e/rules-python-interop/MODULE.bazel
Third-party dependencies now use uv. The E2E module adds a Python 3.12 Django pip hub, exports it, and declares a pinned Django 4.2.4 wheel.
Django project runtime
e2e/rules-python-interop/virtual-deps/django/proj/*, e2e/rules-python-interop/virtual-deps/django/BUILD.bazel
The fixture adds Django settings, admin routing, management commands, and ASGI and WSGI application entry points. Bazel definitions and documented commands use the updated repository and package paths.
Dependency lock and version validation
e2e/rules-python-interop/virtual-deps/django/requirements.*, e2e/rules-python-interop/virtual-deps/django/version_test.py
The fixture adds pinned Django 4.2.7 and PyQt6 dependencies, updates lockfile metadata for Python 3.12, and validates Django presence and version through EXPECT_DJANGO_VERSION.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: xangcastle

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes moving the Django rules_python tests out of the root MODULE file.
Description check ✅ Passed The description explains the reduction of rules_python usage and confirms that existing tests cover the changes.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mv-rules_python-to-e2e

Comment @coderabbitai help to get the list of available commands.

@aspect-workflows

aspect-workflows Bot commented Aug 12, 2026

Copy link
Copy Markdown

✨ Aspect Workflows Tasks

📅 Wed Aug 12 20:18:12 UTC 2026

✅ 39 successful tasks

  • ✅ buildifier · ⏱ 16.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ gazelle · ⏱ 19.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ test-e2e-bazel-8 [test] · ⏱ 5m 17s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (279/279 passed)
  • ✅ test-e2e-bazel-9 [test] · ⏱ 6m 28s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (273/273 passed)
  • ✅ test-e2e-interpreter-build-config-bazel-8 [test] · ⏱ 19.2s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-interpreter-build-config-bazel-9 [test] · ⏱ 1m · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-interpreter-input-validation-bazel-8 [test] · ⏱ 17.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-interpreter-runtime-metadata-bazel-8 [test] · ⏱ 28.8s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed)
  • ✅ test-e2e-interpreter-runtime-metadata-bazel-9 [test] · ⏱ 58.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed)
  • ✅ test-e2e-interpreter-toolchain-settings-bazel-8 [test] · ⏱ 17.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-interpreter-toolchain-settings-bazel-9 [test] · ⏱ 1m 3s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-rules-proto-grpc-python-bazel-8 [test] · ⏱ 1m 54s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-rules-proto-grpc-python-bazel-9 [test] · ⏱ 57.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-e2e-rules-python-interop-bazel-8 [test] · ⏱ 56.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (15/15 passed)
  • ✅ test-e2e-rules-python-interop-bazel-9 [test] · ⏱ 1m 48s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (15/15 passed)
  • ✅ test-e2e-rules-python-provider-compat-bazel-8 [test] · ⏱ 23.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (3/3 passed)
  • ✅ test-e2e-rules-python-provider-compat-bazel-9 [test] · ⏱ 1m 20s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (3/3 passed)
  • ✅ test-examples-debugger-bazel-8 [test] · ⏱ 24.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-debugger-bazel-9 [test] · ⏱ 42.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-dev_deps-bazel-8 [test] · ⏱ 30.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-dev_deps-bazel-9 [test] · ⏱ 38.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-django-bazel-8 [test] · ⏱ 26s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-examples-django-bazel-9 [test] · ⏱ 43s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-examples-multi_version-bazel-8 [test] · ⏱ 27.1s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed)
  • ✅ test-examples-protobuf-bazel-8 [test] · ⏱ 1m 37s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-protobuf-bazel-9 [test] · ⏱ 2m 6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-py_binary-bazel-8 [test] · ⏱ 21.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-examples-py_binary-bazel-9 [test] · ⏱ 36.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-examples-py_pex_binary-bazel-8 [test] · ⏱ 22.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-examples-py_pex_binary-bazel-9 [test] · ⏱ 1m 1s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-examples-py_venv-bazel-8 [test] · ⏱ 24.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (3/3 passed · 3 cached)
  • ✅ test-examples-py_venv-bazel-9 [test] · ⏱ 59.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (3/3 passed)
  • ✅ test-examples-pytest-bazel-8 [test] · ⏱ 41.8s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (11/11 passed)
  • ✅ test-examples-pytest-bazel-9 [test] · ⏱ 1m 8s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (11/11 passed)
  • ✅ test-examples-uv_pip_compile-bazel-8 [test] · ⏱ 21.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-uv_pip_compile-bazel-9 [test] · ⏱ 1m 35s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-examples-virtual_deps-bazel-9 [test] · ⏱ 48s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)
  • ✅ test-root-bazel-8 [test] · ⏱ 2m 32s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (298/298 passed)
  • ✅ test-root-bazel-9 [test] · ⏱ 3m 19s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (297/297 passed)

⏱ Last updated Wed Aug 12 21:40:25 UTC 2026 · 📊 GitHub API quota 640/15,000 (4% used, resets in 33m)
🚀 Powered by Aspect CLI (v2026.28.2)  |  Aspect Build · X · LinkedIn · YouTube

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 26ac580e30

ℹ️ 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".

Comment on lines +47 to +48
python_version = "3.12",
requirements_lock = "//virtual-deps/django:requirements.txt",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Regenerate the moved requirements lock under Python 3.12

The newly referenced lockfile was copied unchanged from the Python 3.9 root workspace: its header still names Python 3.9 and the old //py/tests/virtual-deps/django:requirements.update target, and it retains the Python-<3.11-only typing-extensions dependency. In this workspace the default toolchain is 3.12, so the compile_pip_requirements validation target generated in virtual-deps/django/BUILD.bazel will produce different output; the aspect test //... invocation in .github/workflows/ci-workflows.yaml therefore fails for the rules-python-interop job. Regenerate this lockfile from its new target using the 3.12 toolchain.

Useful? React with 👍 / 👎.

@jbedard
jbedard force-pushed the mv-rules_python-to-e2e branch from 26ac580 to 33649d5 Compare August 12, 2026 20:17
@github-actions

Copy link
Copy Markdown

py_binary startup benchmark

Version Mean (ms) Median (ms) ± stddev vs BCR vs main Build (s)
BCR 1.11.7 (baseline) 172.188 171.893 ±1.738 32.59
HEAD main 56.178 56.223 ±0.529 -67.4% 10.34
This PR 56.393 56.097 ±2.060 -67.2% +0.4% 7.19

Measured with hyperfine --warmup 5 --runs 50 on Linux
Gate: PR vs HEAD main (threshold: 10%). BCR is shown only as a historical baseline.
Build time: cold bazel build //:bench with isolated output base, no disk cache.

sys.path quality

Version sys.path entries distinct site-packages roots duplicate realpaths
BCR 1.11.7 (baseline) 6 1 0
HEAD main 7 2 0
This PR 7 2 0

sys.path quality measured by bench_syspath inside the assembled venv. Duplicate realpaths indicate symlink redundancy; many distinct site-packages roots suggest an inefficient venv layout.

Bazel analysis benchmark

Version Mean (ms) Median (ms) ± stddev vs BCR vs main Targets Actions
BCR 2.0.0-alpha.5 (baseline) 8383.649 8395.043 ±85.396 301 13672
HEAD main 7313.012 7315.764 ±157.761 -12.8% 301 13740
This PR 7339.932 7322.229 ±136.346 -12.4% +0.4% 301 13740

Measured with hyperfine --warmup 1 --runs 10 on Linux
Gate: PR vs HEAD main (threshold: 10%). BCR is shown only as a historical baseline.
Command: cold bazel build --nobuild //workspace/... with isolated output base, no disk cache.

@jbedard
jbedard merged commit f5e11b6 into main Aug 13, 2026
177 of 185 checks passed
@jbedard
jbedard deleted the mv-rules_python-to-e2e branch August 13, 2026 00:56
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