Skip to content

Add new --pull option in build. - #2041

Merged
aanand merged 1 commit into
docker:masterfrom
ggtools:master
Sep 18, 2015
Merged

aanand merged 1 commit into
docker:masterfrom
ggtools:master

Conversation

@ggtools

@ggtools ggtools commented Sep 14, 2015

Copy link
Copy Markdown

The --pull option from docker build is not available on compose. Add it.

Comment thread tests/integration/cli_test.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be split into a separate test case def test_build_with_pull(self)

@dnephin dnephin self-assigned this Sep 14, 2015
@dnephin

dnephin commented Sep 14, 2015

Copy link
Copy Markdown

Thanks for the contribution! This is actually the 3rd(!) attempt to get this in, the previous ones were abandoned by the submitter, so I hope we can get this merged. We should be able to get it in for the next release.

I'll sort out the janky issue, just needs one small change to the test.

This will replace #1494

@dnephin dnephin added this to the 1.5.0 milestone Sep 14, 2015
@ggtools

ggtools commented Sep 14, 2015

Copy link
Copy Markdown
Author

Build didn't pass but it's quite strange the pull tests are passing and the build ends with: Build timed out (after 45 minutes). Marking the build as aborted.

@dnephin

dnephin commented Sep 14, 2015

Copy link
Copy Markdown

Don't worry about the build failures, we're having issues with jenkins right now.

I'll kick off another run when it's working again.

@sdurrheimer

Copy link
Copy Markdown

I will add this to the zsh completion after merge.

@albers Incoming docker-compose build --pull option.

@albers

albers commented Sep 15, 2015

Copy link
Copy Markdown

And I'll add it to bash completion.
Thanks @sdurrheimer for the ping.

@dnephin

dnephin commented Sep 15, 2015

Copy link
Copy Markdown

The build is green, but I think we should split test_build_with_pull into two functions. @ggtools would you mind making that change?

@ggtools

ggtools commented Sep 15, 2015

Copy link
Copy Markdown
Author

Actually if I'm splitting test_build_with_pull I might also split the other method and have 4 methods covering all possible configurations of --no-cache and --pull. What do you think of it?

@dnephin

dnephin commented Sep 15, 2015

Copy link
Copy Markdown

That sounds great, thanks!

Signed-off-by: Christophe Labouisse <[email protected]>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an aside, I think it's a mistake we do this patch as a decorator. It makes it harder to debug tests with pdb. I've been moving some of them to be context managers around just the single line that needs the patch.

Using the with mock.patch() around just the line that needs it also removes the need to do mock_stdout.truncate(0), since it would only wrap the stdout we care about.

Since this is pretty common in our test suite, I wouldn't ask you to change it as part of this PR, I think we can address that in a separate cleanup branch and change them all at once.

@dnephin

dnephin commented Sep 16, 2015

Copy link
Copy Markdown

LGTM

1 similar comment
@aanand

aanand commented Sep 18, 2015

Copy link
Copy Markdown

LGTM

aanand added a commit that referenced this pull request Sep 18, 2015
Add new --pull option in build.
@aanand
aanand merged commit 3e58003 into docker:master Sep 18, 2015
This was referenced Sep 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants