Skip to content

fix(test): keep xdist distribution in the local test runner - #5433

Closed
uuzzrm wants to merge 1 commit into
browser-use:mainfrom
uuzzrm:uuzzrm/issue-5427-local-xdist
Closed

uuzzrm wants to merge 1 commit into
browser-use:mainfrom
uuzzrm:uuzzrm/issue-5427-local-xdist

Conversation

@uuzzrm

@uuzzrm uuzzrm commented Aug 10, 2026 •

Copy link
Copy Markdown

Closes #5427

Summary

pyproject.toml configured --dist=loadscope globally, but pytest-xdist was not enabled by the default test command. That made the option a silent no-op for normal pytest runs while suggesting that tests were being distributed across workers.

This change:

  • removes the unused --dist=loadscope flag from the global pytest addopts;
  • keeps --numprocesses auto --dist=loadscope in bin/test.sh, where the project's local test entry point already enables xdist;
  • leaves the per-file GitHub Actions jobs on the normal single-process pytest path.

This keeps the existing fixture-aware scheduling for the local suite without implicitly enabling xdist for every invocation or CI runner.

Validation

  • uv run pytest tests/ci/test_variable_substitution.py -q — 9 passed
  • uv run pytest tests/ci/test_variable_substitution.py -n 2 --dist=loadscope -q — 9 passed with 2 workers and LoadScopeScheduling
  • pre-commit hooks — passed (pyright skipped because the current Windows environment reports the existing browser_use/logging_config.py os.mkfifo/os.O_NONBLOCK errors)
  • git diff --check

AI assistance was used for the implementation and validation. I reviewed the final diff and am responsible for the changes.


Summary by cubic

Scopes pytest-xdist to the local test runner to avoid a misleading global flag. Previously pyproject.toml set --dist=loadscope without enabling pytest-xdist, which had no effect; now only the local test script enables distribution and default pytest runs stay single-process.

  • Remove --dist=loadscope from pyproject.toml addopts.
  • Run pytest with --numprocesses auto --dist=loadscope in bin/test.sh; CI continues single-process per file.
  • No migration required.

Written for commit 4206ec8. Summary will update on new commits.

Review in cubic

@CLAassistant

CLAassistant commented Aug 10, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@uuzzrm
uuzzrm force-pushed the uuzzrm/issue-5427-local-xdist branch from 3cd1865 to 4206ec8 Compare August 15, 2026 19:32
@uuzzrm

uuzzrm commented Aug 15, 2026

Copy link
Copy Markdown
Author

Rebuilt the branch on top of the current main - the previous head had picked up some unrelated commits from the fork's history, so I re-applied just the two-file change (bin/test.sh + pyproject.toml) onto latest main and force-pushed. Same diff as before, just a clean history now.

@github-actions

Copy link
Copy Markdown

👋 This PR has been automatically marked as stale because it hasn't had activity for 45 days.

To keep this PR open:

  • Rebase against the latest main branch
  • Address any review feedback or merge conflicts
  • Add a comment explaining the current status
  • Add the work-in-progress label if you're still actively working on this

This will be automatically closed in 14 days if no further activity occurs.

Thanks for contributing to browser-use! 🤖

@github-actions github-actions Bot added the stale label Sep 30, 2026
@github-actions

Copy link
Copy Markdown

🔒 This PR was automatically closed because it was stale for 14 days with no activity.

Don't worry! If you'd like to continue this work:

  • Reopen this PR and rebase against main
  • Create a fresh PR with updated changes
  • Join our Discord if you need help

Thanks for contributing to browser-use! 🤖

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: --dist=loadscope in addopts is a silent no-op — pytest-xdist never activates without -n

2 participants