Uh oh!
There was an error while loading. Please reload this page.
Only recreate what's changed - #1399
Conversation
aanand
commented
May 9, 2015
Edit: this is now implemented. After giving it some thought, it'd be far easier to just label every container with a hash generated from the service dict that was used to create it, and compare hashes to see if a container needs recreating. This means we can avoid doing any of the configuration diffing stuff, which is (a) hairy to implement (b) full of corner cases (c) going to be a total pain to debug. Thoughts? |
dnephin
commented
May 9, 2015
I agree, I like the idea of using a hash. It should make things a lot easier. |
9326dbd to
83923d5Compareaanand
commented
May 12, 2015
Pushed an initial implementation using hashes. |
aanand
commented
May 14, 2015
Downstream dependent services are now recreated when an upstream dependency is recreated. |
1bdfee9 to
2a8210eCompare8fefbb2 to
b4cd02cCompareaanand
commented
May 14, 2015
This is now ready for review. |
aanand
commented
May 14, 2015
One thing worth noting: the Compose now shows a warning if you pass |
7f2bdde to
e5d8447CompareIf we're just streaming logs from `docker-compose up`, we don't need to set AttachStdin/out/err, and doing so results in containers with different configuration depending on whether `up` or `run` were invoked with `-d` or not. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
aanand
commented
May 18, 2015
Just rebasing this now that #1356 is in! |
There was a problem hiding this comment.
When we were chatting about #1395 I suggested to support the feature we'd probably want to store the DAG of the services in compose.project.sort_service_dicts() instead of flattening it immediately.
I think that data structure would make this easier as well. Instead of having to lookup the dependencies for each service, we could immediately add recreate plans for all dependencies. When it's available we could consider using it here.
There was a problem hiding this comment.
Yeah, I think that'd be a good refactor as part of implementing #1395.
6f29b7a to
a863857Compareaanand
commented
May 18, 2015
Rebased and removed |
aanand
commented
May 18, 2015
Whoops, the tests are still using |
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
aanand
commented
May 18, 2015
Build is green. |
dnephin
commented
May 18, 2015
LGTM |
prologic
commented
Aug 24, 2015
This feature isn't it any published version of docker-compose yet right? |
wader
commented
Aug 24, 2015
@prologic it was introduced in 1.3 |
prologic
commented
Aug 24, 2015
As a default (no special cil option) feature? :) |
wader
commented
Aug 24, 2015
Sorry, not default, as a option to |
prologic
commented
Aug 24, 2015
This one I guess :) |
wader
commented
Aug 24, 2015
Hmm what version is that? |
prologic
commented
Aug 24, 2015
|
wader
commented
Aug 24, 2015
Your totally right, i'm running 1.3.1 and should probably update :) From 1.4 changelog https://github.com/docker/compose/blob/master/CHANGELOG.md |
prologic
commented
Aug 24, 2015
👍 Awesome :) |
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.35.0 to 0.38.0. - [Commits](golang/net@v0.35.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Closes#1345. To try it out:
Here's what needs fixing:
imageorbuild) has changed, this should trigger a recreate.links,volumes_fromandnet:containershould also be recreated, whether or not their configuration has changed.