run output empty, non-deterministic
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Environment
docker==3.5.0
docker-pycreds==0.3.0
Python 3.6.5
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:05:28 2018
OS/Arch: windows/amd64
Experimental: false
Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:13:46 2018
OS/Arch: linux/amd64
Experimental: false
| OS | Docker |
|---|---|
Microsoft Windows [Version 10.0.16299.547] |
Docker for Windows, Community Edition |
Issue
I am getting non-deterministic output from a docker run command executed via the docker-py api. A cat command should output the content of a file for a test but the returned text is an empty byte string (b'') in some scenarios. When you manually check the output of the corresponding container via docker logs <container> afterwards, the correct output is printed. This is similar to the issue described in #1924. I attached a minimal example to reproduce the problem as a zip file (errorTest_docker-py.zip).
Reproducing
Test-Scenario
I did a very stupid Dockerfile which is basically Ubuntu with a very stupid python-generated .zip file which is copied to root on build. The test now executes a cat-statement on the archive, which should return the archive's content. This is repeated 20 times. for me it fails in differing iterations. Sometimes it fails directly in the first iteration, sometimes it fails in the second, and so on.
Steps to reproduce:
- Unpack the archive, switch to that directory
docker build -t docker-py .- execute the unit test by running:
python errorTest.py. If the test fails, the error occurred.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Unpack errorTest_docker-py.zip and inspect errorTest.py and the Dockerfile first. Run the unit test repeatedly after building the image, then compare the returned bytes with docker logs for the same container. Done means the repeated test reliably returns the expected archive content instead of an empty byte string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, backend, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100