Skip to content

Conversation

@markovejnovic
Copy link
Contributor

No description provided.

@markovejnovic markovejnovic merged commit 6f91ef4 into main Feb 9, 2026
4 checks passed
Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

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

Performed full review of b147318...e5b6d59

Analysis

  1. Forced parallel test execution ("-n auto") may cause excessive resource contention, particularly problematic on lightweight development machines or when tests spin up Docker containers
  2. No configuration mechanism to control/limit parallelism levels based on available system resources or environment needs
  3. Adding pytest-xdist as a first-class dependency unnecessarily increases the install footprint for end-users who don't need multiprocessing capabilities
  4. The multiprocessing approach lacks safeguards to prevent resource exhaustion in CI environments

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 1 comments | Edit Agent SettingsRead Docs

dependencies = [
"cloudpickle>=3.1.1",
"pytest>=9.0.2",
"pytest-xdist>=3.5.0",
Copy link

Choose a reason for hiding this comment

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

Medium

Adding pytest-xdist to the main dependencies list means every consumer of the plugin now installs xdist/execnet even though the library code never imports or interacts with xdist—it’s only used here to speed up this repository’s own test run. That extra dependency surface can bloat installs and introduce compatibility issues for end-users who don’t need parallel pytest workers. Could we keep xdist in the dev/test dependency group (and still invoke it from CI with uv run --group dev pytest -n auto), or make it an optional extra instead of a hard requirement?

Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: mesa-dot-dev/pytest-in-docker#7
File: pyproject.toml#L28
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
Adding `pytest-xdist` to the main `dependencies` list means every consumer of the plugin now installs xdist/execnet even though the library code never imports or interacts with xdist—it’s only used here to speed up this repository’s own test run. That extra dependency surface can bloat installs and introduce compatibility issues for end-users who don’t need parallel pytest workers. Could we keep xdist in the dev/test dependency group (and still invoke it from CI with `uv run --group dev pytest -n auto`), or make it an optional extra instead of a hard requirement?

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Feb 9, 2026

Mesa Description

This PR configures the test suite to run in parallel, which will speed up test execution for both local development and CI builds.

By leveraging the pytest-xdist plugin, tests can now run concurrently across multiple CPU cores, reducing the overall time required to get feedback from the test suite.

Changes

  • Added pytest-xdist as a project dependency in pyproject.toml.
  • Updated pyproject.toml to set -n auto as a default pytest option, enabling parallel execution locally.
  • Modified the CI workflow (.github/workflows/ci.yml) to also use the -n auto flag, ensuring tests run in parallel within GitHub Actions.

Description generated by Mesa. Update settings

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