Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugins): Create concurrency pytest plugin #824

Merged
merged 7 commits into from
Sep 24, 2024
Merged

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Sep 20, 2024

🗒️ Description

Creates a new plugin that facilitates concurrency in all test-related commands such as fill, consume and execute.

Before the plugin, all different plugins created its own temporary folder in order to save information that was meant to be share across different xdist processes (e.g. the execution client running the tests in consume, or in execute hive), and it relied on each plugin having the temporary folder being passed by the command caller for all instances to coincide on the same folder name.

Now the concurrency plugin uses testrun_uid to generate a deterministic temporary folder that will be the same across processes, and can be used for coordination.

🔗 Related Issues

Functionality initially added in #712.

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@marioevz marioevz added scope:pytest Scope: Pytest plugins type:feat type: Feature labels Sep 20, 2024
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Really nice abstraction. So nice to get this out of the cli and abstracted to this plugin.

LGTM, just a few minor comments, mainly help/docstrings below.

src/pytest_plugins/concurrency.py Outdated Show resolved Hide resolved
src/pytest_plugins/pytest_hive/pytest_hive.py Outdated Show resolved Hide resolved
src/pytest_plugins/concurrency.py Outdated Show resolved Hide resolved
src/pytest_plugins/concurrency.py Show resolved Hide resolved
Co-authored-by: danceratopz <danceratopz@gmail.com>
@marioevz
Copy link
Member Author

@danceratopz awesome suggestions, thanks for the review, I'll merge in a bit :)

@marioevz marioevz merged commit a90b001 into main Sep 24, 2024
7 checks passed
@marioevz marioevz deleted the concurrency-plugin branch September 24, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:pytest Scope: Pytest plugins type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants