Skip to content

Bump docker-py to 4.0.2, and run tests from upstream repository#39068

Merged
tiborvass merged 6 commits intomoby:masterfrom
thaJeztah:separate_docker_py
Jul 18, 2019
Merged

Bump docker-py to 4.0.2, and run tests from upstream repository#39068
tiborvass merged 6 commits intomoby:masterfrom
thaJeztah:separate_docker_py

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Apr 13, 2019

closes #37939
addresses #36415
closes #39239

This removes all the installation steps for docker-py from the
Dockerfile, and instead builds the upstream Dockerfile, and runs
docker-py tests in a container.

To test;

make test-docker-py

...

Removing bundles/

---> Making bundle: dynbinary (in bundles/dynbinary)
Building: bundles/dynbinary-daemon/dockerd-dev
Created binary: bundles/dynbinary-daemon/dockerd-dev

---> Making bundle: test-docker-py (in bundles/test-docker-py)
---> Making bundle: .integration-daemon-start (in bundles/test-docker-py)
Using test binary docker
Starting dockerd
INFO: Waiting for daemon to start...
.
INFO: Building docker-sdk-python3:3.7.0...
sha256:686428ae28479e9b5c8fdad1cadc9b7a39b462e66bd13a7e35bd79c6a152a402
INFO: Starting docker-py tests...
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-4.1.0, py-1.8.0, pluggy-0.9.0
rootdir: /src, inifile: pytest.ini
plugins: timeout-1.3.3, cov-2.6.1
collected 359 items

tests/integration/api_build_test.py .......s....
....

relates to docker/docker-py#2310

Dockerfile Outdated
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Need to check if there's other dependencies that were only there for docker-py

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@chris-crone any other reps that stand out and might be docker-py specific?

Copy link
Copy Markdown
Member Author

@thaJeztah thaJeztah Apr 13, 2019

Choose a reason for hiding this comment

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

Looks like a bug in the 17.06 cli; it fails when using a commit, but passes if I use a tag 🤔

@thaJeztah
Copy link
Copy Markdown
Member Author

Yay, it works 🎉

17:37:53 ======== 348 passed, 5 skipped, 4 xfailed, 2 xpassed in 384.42 seconds ========

@thaJeztah thaJeztah force-pushed the separate_docker_py branch from 49a7c4a to a200368 Compare April 16, 2019 15:36
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@81dbed4). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #39068   +/-   ##
=========================================
  Coverage          ?   37.29%           
=========================================
  Files             ?      609           
  Lines             ?    45234           
  Branches          ?        0           
=========================================
  Hits              ?    16870           
  Misses            ?    26069           
  Partials          ?     2295

Makefile Outdated
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added these, so that they can be passed to the container 🎉

@thaJeztah thaJeztah changed the title [WIP] Run docker-py tests from upstream repository Run docker-py tests from upstream repository Apr 16, 2019
@thaJeztah thaJeztah force-pushed the separate_docker_py branch from a200368 to d2405f5 Compare April 16, 2019 15:52
@thaJeztah
Copy link
Copy Markdown
Member Author

Removed "WIP" - I think this is ready for prime-time 🎉

ping @tianon @chris-crone @cpuguy83 PTAL 🤗

@thaJeztah thaJeztah force-pushed the separate_docker_py branch from d2405f5 to 764679f Compare April 16, 2019 18:20
@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Apr 16, 2019

Looks like some issues with an image we're using in CI:

19:13:43 FAIL: docker_cli_pull_test.go:273: DockerSuite.TestPullWindowsImageFailsOnLinux
19:13:43 
19:13:43 assertion failed: expected error to contain "cannot be used on this platform", got "\nCommand:  /usr/local/cli/docker pull microsoft/nanoserver\nExitCode: 1\nError:    exit status 1\nStdout:   Using default tag: latest\n\nStderr:   Error response from daemon: manifest for microsoft/nanoserver:latest not found: manifest unknown: manifest unknown\n\n\nFailures:\nExitCode was 1 expected 0\nExpected no error"
19:13:45 
Error response from daemon: manifest for microsoft/nanoserver:latest not found

@thaJeztah thaJeztah force-pushed the separate_docker_py branch 3 times, most recently from 00867c8 to ab65a86 Compare April 16, 2019 21:10
@thaJeztah
Copy link
Copy Markdown
Member Author

@tianon thanks! Updated; ptal 🤗

Copy link
Copy Markdown
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@thaJeztah
Copy link
Copy Markdown
Member Author

@cpuguy83 LGTY?

Copy link
Copy Markdown
Contributor

@chris-crone chris-crone left a comment

Choose a reason for hiding this comment

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

LGTM

@shin- put up a PR to merge the Dockerfiles for docker-py which will mean that this requires changes. It's not merged yet though.

@thaJeztah
Copy link
Copy Markdown
Member Author

Ah, I see, so it would have to be

-f tests/Dockerfile

instead of

-f Dockerfile-py3

@thaJeztah thaJeztah force-pushed the separate_docker_py branch from ab65a86 to a29cec8 Compare April 17, 2019 23:32
@thaJeztah
Copy link
Copy Markdown
Member Author

rebased to trigger CI

@thaJeztah
Copy link
Copy Markdown
Member Author

01:49:56   Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9b083c40b8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/appdirs/
01:49:56   Could not find a version that satisfies the requirement appdirs==1.4.3 (from -r requirements.txt (line 1)) (from versions: )
01:49:56 No matching distribution found for appdirs==1.4.3 (from -r requirements.txt (line 1))

@thaJeztah thaJeztah changed the title [WIP] Bump docker-py to 4.0.2, and run tests from upstream repository Bump docker-py to 4.0.2, and run tests from upstream repository Jul 16, 2019
@thaJeztah
Copy link
Copy Markdown
Member Author

Windows RS1 is failing to wipe the workspace https://jenkins.dockerproject.org/job/Docker-PRs-WoW-RS1/25913/console

12:36:11 Building remotely on azure-windows-rs1-3 (windows-rs1) in workspace /gopath/src/github.com/docker/docker
12:36:11 No credentials specified
12:36:11 Wiping out workspace first.
12:36:12 jenkins.util.io.CompositeIOException: Unable to delete '\gopath\src\github.com\docker\docker'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.

Copy link
Copy Markdown
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Copy Markdown
Member Author

Boo! Why is it failing again?

14:40:56 W: Failed to fetch http://deb.debian.org/debian/dists/jessie/InRelease  
14:40:56 
14:40:56 W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/InRelease  
14:40:56 
14:40:56 W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release.gpg  Temporary failure resolving 'deb.debian.org'
14:40:56 
14:40:56 W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/Release.gpg  Temporary failure resolving 'security.debian.org'
14:40:56 
14:40:56 W: Some index files failed to download. They have been ignored, or old ones used instead.

See if networking works if we run it first

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

Moved docker-py tests first again to see if the networking issues are because integration tests don't cleanup properly?

@thaJeztah
Copy link
Copy Markdown
Member Author

"YAY" so it passes if we run docker-py first

18:04:32 INFO: Building docker-sdk-python3:4.0.2...
18:14:10 sha256:c32514b539959ddb15e05f7c57552d0ca8d49ba25ac779f89663415c9b90a4c2
18:14:10 INFO: Starting docker-py tests...
18:14:33 ============================= test session starts ==============================
...
18:22:31 

18:22:31 = 367 passed, 10 skipped, 3 deselected, 3 xfailed, 2 xpassed in 477.76 seconds =

and it fails if we run it after test-integration-flaky, test-integration, and cross

flippy

Copy link
Copy Markdown
Contributor

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

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

SGTM w.r.t. getting more control over flaky tests

@thaJeztah
Copy link
Copy Markdown
Member Author

I'll update the last commit's title

@tiborvass tiborvass merged commit 7641600 into moby:master Jul 18, 2019
@thaJeztah thaJeztah deleted the separate_docker_py branch July 18, 2019 19:23
@seemethere
Copy link
Copy Markdown
Contributor

Does it make sense if we even removed the docker-py tests from this repository completely?

@thaJeztah
Copy link
Copy Markdown
Member Author

@seemethere they have caught API regressions / changes at several occasions, so they can be useful. They should run separately though (I guess can do that once we have the Jenkinsfile up and running)

@thaJeztah
Copy link
Copy Markdown
Member Author

And, possibly, we should just have an image that we pull instead of building here 🤷‍♂

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.

8 participants