Rename service replica groups to groups and support IP interpolation - #4177
Open
Bihan wants to merge 1 commit into
Open
Rename service replica groups to groups and support IP interpolation#4177Bihan wants to merge 1 commit into
Bihan wants to merge 1 commit into
Conversation
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.
Services can now use the same groups: layout as tasks, and service commands can reference other replicas by IP with ${{ groups[i].replicas[j].IP_ADDRESS }}.
Previously, heterogeneous services used a list under replicas with count. That is renamed to groups with replicas (matching tasks’ groups / nodes). Old YAML still works; saved configs still use the old replicas: [{count}] layout.
A follow-up PR can deprecate that layout and save as groups instead.
Key changes
Old
New
Saved configs still use the old replicas layout, not groups.
You can only reference replicas that are guaranteed at start:
Preset build had a helper that assumed service.replicas is a list of groups, but that list shape no longer exists in memory after this PR.
Before
After
This does not change behavior for presets that were already saved. Existing presets load as-is; this logic only runs when building a new preset.
Next: Separate PR for Docs