Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return "invalid parameter" when linking to non-existing container #39852

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

thaJeztah
Copy link
Member

fixes #39823
fixes docker/for-mac#3871

Trying to link to a non-existing container is not valid, and should return an
"invalid parameter" (400) error. Returning a "not found" error in this situation
would make the client report the container's image could not be found.

@thaJeztah
Copy link
Member Author

Only failure is a flaky test (tracked through #38521)

[2019-09-02T22:52:41.080Z] FAIL: docker_cli_start_test.go:190: DockerSuite.TestStartReturnCorrectExitCode
[2019-09-02T22:52:41.080Z] 
[2019-09-02T22:52:41.080Z] assertion failed: expected an error, got nil

Trying to link to a non-existing container is not valid, and should return an
"invalid parameter" (400) error. Returning a "not found" error in this situation
would make the client report the container's image could not be found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the detect_invalid_linked_container branch from 2c3e001 to 422067b Compare September 10, 2019 21:07
@thaJeztah
Copy link
Member Author

ping @tiborvass @cpuguy83 PTAL

Copy link
Contributor

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

@vdemeester vdemeester 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
Member Author

Failure on RS1 is https://ci.docker.com/public/job/moby/job/PR-39852/5/execution/node/180/log/

which is known to be flaky (#36801), and for which I have a PR to skip it conditionally; #39856

23:48:42  --- FAIL: TestJSONFileLoggerWithOpts (0.01s)
23:48:42      jsonfilelog_test.go:187: open C:\Users\ContainerAdministrator\AppData\Local\Temp\docker-logger-996957197\container.log.1: The process cannot access the file because it is being used by another process.
23:48:42  FAIL

Everything else is green, so I'll go ahead and merge this one

@thaJeztah thaJeztah merged commit cd9e4ec into moby:master Sep 11, 2019
@thaJeztah thaJeztah deleted the detect_invalid_linked_container branch September 11, 2019 07:51
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants