sort secrets and configs to ensure idempotence - #509
Merged
vdemeester merged 1 commit intoSep 15, 2017
Conversation
Codecov Report
@@ Coverage Diff @@
## master #509 +/- ##
==========================================
- Coverage 49.01% 48.99% -0.03%
==========================================
Files 199 199
Lines 16392 16402 +10
==========================================
+ Hits 8035 8036 +1
- Misses 7939 7948 +9
Partials 418 418 |
dnephin
reviewed
Sep 7, 2017
dnephin
left a comment
Contributor
There was a problem hiding this comment.
Thanks. It looks like ParseSecrets() and ParseConfigs() do randomize the order of these unfortunately.
I think sorting is the correct solution, but I don't think the sort belongs in this function. Could you please move it to convertServiceSecrets() and convertServiceConfigObjs()
xificurC
force-pushed
the
fix-secrets-and-configs-idempotence
branch
from
September 8, 2017 13:53
b03cbbb to
34f8c0f
Compare
`docker stack deploy` keeps restarting services it doesn't need to (no changes) because the entries' order gets randomized at some previous (de)serialization. Maybe it would be worth looking into this at a higher level and ensure all (de)serialization happens in an ordered collection. This quick fix sorts secrets and configs (in place, mutably) which ensures the same order for each run. Based on moby/moby#30506 Fixes moby/moby#34746 Signed-off-by: Peter Nagy <xificurC@gmail.com>
xificurC
force-pushed
the
fix-secrets-and-configs-idempotence
branch
from
September 8, 2017 14:10
34f8c0f to
27e8bdf
Compare
Author
|
refactored as requested |
This was referenced Sep 19, 2017
|
How's this tested? |
Contributor
|
@mghazizadeh the steps are given on the upstream PR: moby/moby#34746 |
vdemeester
added a commit
to vdemeester/docker-cli
that referenced
this pull request
Nov 30, 2017
Related PR : docker#509 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
vdemeester
added a commit
to vdemeester/docker-cli
that referenced
this pull request
Nov 30, 2017
Related PR : docker#509 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
vdemeester
added a commit
to vdemeester/docker-cli
that referenced
this pull request
Nov 30, 2017
Related PR : docker#509 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
vdemeester
added a commit
to vdemeester/docker-cli
that referenced
this pull request
Nov 30, 2017
Related PR : docker#509 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
vdemeester
added a commit
to vdemeester/docker-cli
that referenced
this pull request
Nov 30, 2017
Related PR : docker#509 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Contributor
|
@mghazizadeh test was added in #719 |
andrewhsu
pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Dec 1, 2017
Related PR : docker/cli#509 Signed-off-by: Vincent Demeester <vincent@sbr.pm> Upstream-commit: 5ed399e58873944bf5e992284c751a200417318c Component: cli
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.
docker stack deploykeeps restarting services it doesn't need to (no changes)because the entries' order gets randomized at some previous (de)serialization.
Maybe it would be worth looking into this at a higher level and ensure
all (de)serialization happens in an ordered collection.
This quick fix sorts secrets and configs (in place, mutably) which ensures the
same order for each run.
Based on
moby/moby#30506
Fixes
moby/moby#34746