feat: add client restart retries and orphan container cleanup options - #18
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new execution-time controls to make benchmark runs more robust: configurable execution-client restart retries, and an optional “reap orphans” pre-step to clean up containers/networks left behind by hard-killed runs.
Changes:
- Introduces
client_restart_retriesto optionally apply anon-failurerestart policy for the execution client container. - Adds per-scenario Docker labels and an optional orphan reaper to remove leftover labeled containers/networks before running.
- Refactors container teardown into a shared helper to standardize cleanup/log collection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/expb/payloads/executor/executor.py | Adds restart policy support, per-scenario labeling, orphan cleanup, and refactors teardown/cleanup logic. |
| src/expb/execute_scenarios.py | Exposes new CLI flags for restart retries and orphan reaping across multi-scenario execution. |
| src/expb/execute_scenario.py | Exposes new CLI flags for restart retries and orphan reaping for single-scenario execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The cleanup refactor moved the execution client teardown into _teardown_container with stop_timeout=60/5, which would revert the 120s flush window (PGO profiles, RocksDB flush, dotTrace snapshots) introduced on main. Use 120s unconditionally to keep that behavior.
Address PR review: reject negative client_restart_retries with a clear ValueError (and min=0 at the CLI), and annotate run_k6 as returning bytes since detach=False returns the container logs, not a Container.
# Conflicts: # src/expb/payloads/executor/executor.py
Add ruff and ty as dev dependencies and run them as dedicated CI jobs alongside pytest. Fix the issues they surface: - drop unused pydantic.NewPath import in scenarios.py - annotate get_execution_client_volumes as list[dict[str, Any]] - guard container.attrs before subscripting in the compressor
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.
No description provided.