Extract container management from conftest.py to _container.py#307
Merged
chrisguidry merged 3 commits intomainfrom Jan 26, 2026
Merged
Extract container management from conftest.py to _container.py#307chrisguidry merged 3 commits intomainfrom
chrisguidry merged 3 commits intomainfrom
Conversation
Moves ~180 lines of Docker container management code (Redis container lifecycle, cluster setup, ACL configuration, port allocation) into a dedicated module. This gets conftest.py under the 500-line loq limit and makes the container infrastructure easier to find and maintain. Also adds retry logic with exponential backoff for transient Docker image pull failures via `run_container_with_retry()`. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
📚 Documentation has been built for this PR! You can download the documentation directly here: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #307 +/- ##
==========================================
- Coverage 99.64% 98.64% -1.00%
==========================================
Files 98 99 +1
Lines 9767 9903 +136
Branches 468 483 +15
==========================================
+ Hits 9732 9769 +37
- Misses 20 118 +98
- Partials 15 16 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Uses ParamSpec to forward the wrapped function's signature, so `with_image_retry(client.containers.run)(...)` keeps full typing. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Container management code has conditional branches for cluster/standalone that vary by Redis config, same as conftest.py and _key_leak_checker.py. Co-Authored-By: Claude Opus 4.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves ~180 lines of Docker container management code (Redis container lifecycle, cluster setup, ACL configuration, port allocation) into a dedicated
tests/_container.pymodule. This gets conftest.py under the 500-line loq limit and makes the container infrastructure easier to find and maintain.Also adds retry logic with exponential backoff for transient Docker image pull failures via
run_container_with_retry().🤖 Generated with Claude Code