tests/exec: expect 127 exit code for missing executable#3290
Merged
thaJeztah merged 2 commits intodocker:mainfrom Sep 30, 2024
Merged
tests/exec: expect 127 exit code for missing executable#3290thaJeztah merged 2 commits intodocker:mainfrom
thaJeztah merged 2 commits intodocker:mainfrom
Conversation
Contributor
Author
|
PR to fix the breaking docker-py test: #3290 I called it out there, but we'll need to TAL at the dependencies between the engine and docker-py. Docker-py runs integration tests against the engine, and the engine uses docker-py to run tests, so changing it in either place first is a bit annoying. We might need to skip the test in docker-py -> change the engine behavior -> unskip+fix the test in docker-py, and update the engine version it runs against. |
thaJeztah
reviewed
Sep 27, 2024
3235d5c to
a252402
Compare
thaJeztah
reviewed
Sep 27, 2024
Docker Engine has always returned `126` when starting an exec fails due to a missing binary, but this was due to a bug in the daemon causing the correct exit code to be overwritten in some cases – see: moby/moby#45795 Change tests to expect correct exit code (`127`). Signed-off-by: Laura Brehm <laurabrehm@hey.com>
a252402 to
cd2d263
Compare
thaJeztah
reviewed
Sep 27, 2024
laurazard
added a commit
to laurazard/moby
that referenced
this pull request
Sep 27, 2024
Temporarily skip the exec run failed exit code test in `docker-py` – https://github.com/docker/docker-py/blob/a3652028b1ead708bd9191efb286f909ba6c2a49/tests/integration/models_containers_test.py#L356-L363 We can reenable this after the PR fixing the expected exit code in that test is merged/released/included – docker/docker-py#3290 Signed-off-by: Laura Brehm <laurabrehm@hey.com>
128ae9a to
f0048c1
Compare
Execs should return the exit code of the exec'd process, if it started. Signed-off-by: Laura Brehm <laurabrehm@hey.com>
f0048c1 to
b126547
Compare
Contributor
Author
|
It's passing now @thaJeztah 🎉 |
maggie44
pushed a commit
to maggie44/moby
that referenced
this pull request
Dec 8, 2024
Temporarily skip the exec run failed exit code test in `docker-py` – https://github.com/docker/docker-py/blob/a3652028b1ead708bd9191efb286f909ba6c2a49/tests/integration/models_containers_test.py#L356-L363 We can reenable this after the PR fixing the expected exit code in that test is merged/released/included – docker/docker-py#3290 Signed-off-by: Laura Brehm <laurabrehm@hey.com>
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.
The Docker Engine has always returned
126when starting an exec fails due to a missing binary, but this was due to a bug in the daemon causing the correct exit code to be overwritten in some cases – see: moby/moby#45795Change tests to expect correct exit code (
127).Note: Must take some care to what's the best way to fix this without breaking engine or vice-versa, due to the engine running tests against docker-py and docker-py running tests against the engine. It might be necessary to 1st. skip the test, then fix the engine, then fix/unskip the test.