Add [collection:x] config section for cross-group process organization#1716
Closed
owensk wants to merge 1 commit intoSupervisor:mainfrom
Closed
Add [collection:x] config section for cross-group process organization#1716owensk wants to merge 1 commit intoSupervisor:mainfrom
owensk wants to merge 1 commit intoSupervisor:mainfrom
Conversation
Collections allow programs to be logically grouped across multiple process groups without affecting lifecycle ownership. Groups still own start/stop/restart; collections are a purely organizational layer that delegates operations to the owning groups. New config format: [collection:web-tier] programs=nginx,gunicorn groups=workers New RPC methods: listCollections, getCollectionProcessInfo, startCollection, stopCollection, signalCollection. New CLI commands: collection status/start/stop. Web UI supports ?collection= filtering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
#1715 (closed) has nearly the same description also. |
Member
|
Closing as a duplicate of #556. While this was mentioned before about ten years ago as you note, managing process "tiers" remains out of scope for the core Supervisor project. I think the maintenance burden of dealing with all this additional complexity and code outweighs the benefits for the majority of users, so we will not be pursuing this. |
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
Adds
[collection:x], a new configuration section that defines logical, cross-group views over processes without affecting lifecycle ownership. Closes #1715.This has been requested before (#556, #1026) but never implemented. Collections are intentionally lightweight — they don't own process lifecycle, groups still do. A collection simply references processes by name or includes entire groups, then delegates operations to the owning group.
Example Configuration
Changes
supervisor/collection.pyCollectionclass — thin wrapper holding config + resolved(group, process)memberssupervisor/options.pyCollectionConfigdata class,collections_from_parser()for[collection:x]sectionssupervisor/supervisord.pyresolve_collection,add_collection,remove_collection,diff_collections_to_activesupervisor/rpcinterface.pylistCollections,getCollectionProcessInfo,startCollection,stopCollection,signalCollectionsupervisor/supervisorctl.pycollection status/start/stopcommands with tab completionsupervisor/events.pyCollectionAddedEvent,CollectionRemovedEventdocs/configuration.rst,docs/api.rstsupervisor/tests/test_collection.pyDesign
[group:x]retains that responsibilityupdate— membership stays in sync with config changesBackwards Compatibility
No existing configuration, API, CLI, or event behavior is modified. The
[collection:x]section prefix is new and does not conflict with existing section types. All changes are additive. The full existing test suite (1,385 tests) passes without modification.Test Plan
CollectionConfigequality, ordering, and reprcollections_from_parserparses programs, groups, both, and rejects empty collectionscollections_from_parsersorts by priority and ignores non-collection sectionsresolve_collectionmatches by program name, group name, cross-group, and deduplicatesresolve_collectionsilently skips missing programs and groupsadd_collection/remove_collectionupdate runtime state and fire eventsdiff_collections_to_activedetects added, changed, and removed collectionsCollectionAddedEvent/CollectionRemovedEventproduce correct payloads