Skip to content

feat: add client restart retries and orphan container cleanup options - #18

Merged
cbermudez97 merged 5 commits into
mainfrom
fix/containers-cleanup
Jul 15, 2026
Merged

feat: add client restart retries and orphan container cleanup options#18
cbermudez97 merged 5 commits into
mainfrom
fix/containers-cleanup

Conversation

@cbermudez97

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_retries to optionally apply an on-failure restart 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.

Comment thread src/expb/payloads/executor/executor.py
Comment thread src/expb/payloads/executor/executor.py
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
@cbermudez97
cbermudez97 merged commit b92526b into main Jul 15, 2026
3 checks passed
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.

2 participants