feat: improve docker-compose generation with restart, depends_on, network, and ZMQ mode #551
Open
Sahil-u07 wants to merge 2 commits into
Open
feat: improve docker-compose generation with restart, depends_on, network, and ZMQ mode #551Sahil-u07 wants to merge 2 commits into
Sahil-u07 wants to merge 2 commits into
Conversation
…work, and zmq mode
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the --compose flag output in the concore build command so the generated docker-compose.yml is actually runnable: services get a restart policy, a shared bridge network, and sequential depends_on links. Adds a new --zmq flag that injects CONCORE_TRANSPORT=zmq into every service for ZMQ-mode studies, and replaces the previous silent None return with a user-visible warning when no run script exists.
Changes:
- Extend
_write_docker_composeto emitrestart,depends_on,networks, and optional ZMQ environment per service, plus a top-levelconcore_netbridge network and console warning when the dockerrunfile is missing. - Add
--zmqCLI flag with validation that it requires--compose, and threadzmq_modethrough tobuild_workflow/_write_docker_compose. - Add 8 unit tests covering restart policy, network section, depends_on ordering, ZMQ env presence/absence, missing-script behavior, and CLI validation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
concore_cli/commands/build.py |
Reworks compose generation: adds restart/depends_on/networks/env blocks per service, moves networks declaration to bottom, warns when run script is missing, accepts console and zmq_mode parameters. |
concore_cli/cli.py |
Adds --zmq build option, validates it requires --compose, passes zmq_mode to build_workflow. |
tests/test_compose_generation.py |
New tests for compose generation features and --zmq CLI validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What's this
The
--composeflag existed but generated a baredocker-compose.yml- justimage:andvolumes:per service. This makes the output actually usable.What changed
restart: on-failureon every service so nodes that lose a startuprace don't die permanently
depends_onbetween services for startup ordering(ordering hint only - concore studies use feedback loops so this
isn't a correctness guarantee)
concore_netbridge network so containers can reach eachother by name without manual port wiring
--zmqflag that injectsCONCORE_TRANSPORT=zmqinto eachservice environment for ZMQ transport studies
--composeis used but no dockerrunscriptexists yet, replacing the previous silent
NonereturnFiles touched
concore_cli/commands/build.py- compose generation logicconcore_cli/cli.py---zmqflag and validationtests/test_compose_generation.py- 8 new testsVerify locally