-
Notifications
You must be signed in to change notification settings - Fork 18.8k
remove deprecated feature of passing HostConfig at API container start #22570
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
Conversation
LGTM :) |
I don't know how we usually handled API deprecations like this. Looking at this, I wonder if we actually can remove this, without disabling API versions 1.something and older. The reason for a versioned API is of course that it doesn't change, so wondering if we should disable older API versions altogether. Open to suggestions, just thinking out loud here |
0aa61ad
to
4577d88
Compare
@thaJeztah Could you provide some information or previous discussion about deprecating this feature? |
@mountkin yes, I'm trying to think of other examples, i.e., have we done this before? Usually, we keep the old behavior around for older API versions, so perhaps we should change it to be an error for API version 1.24 and above, but keep the old behavior for older versions. |
I don't think we can just remove it, which means we'll have to still handle older API versions, which means the case must still be handled (by switching on API versions) which will probably make the code more complex and not less, sadly. |
I agree with @cpuguy83 |
Alright, so we should keep this code around (unfortunately), and make it an error if it's used on API 1.24 or above (instead of just a warning). @mountkin can you update the PR to do that? Sorry for that, I think we all wished we could cleanup this code |
4577d88
to
98fce68
Compare
I think we can add an HTTP header (for example: |
Code updated. |
cb96ad2
to
25067e7
Compare
dfaecfd
to
ebe464e
Compare
🤘 LGTM |
It looks like WinTP5 complains in those new tests, btw. |
ebe464e
to
9c53f87
Compare
All tests passed. PTAL again. Thanks |
LGTM 👍 |
Putting it to docs-review, @thaJeztah 😝 |
I think we should add a mention in the API changes; something like; * `POST /containers/(id or name)/start` no longer accepts a `HostConfig` |
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
9c53f87
to
0a8386c
Compare
doc updated |
Thanks! LGTM ping @vdemeester ptal |
LGTM 🐮 |
This fix tries to address several issues in deprecated.md: 1. For deprecated and removal versions, some include link reference to the release tag but some does not point to the release tag. This fix adds the missing links as long as the version is <= 1.12. 2. Technically, 1.12 is not released yet so the link to 1.12 does not exist yet. However, at the time 1.12 is released this deprecated.md doc should have been part of the release as well. There is a circular dependency. This fix adds 1.12 for now. 3. `HostConfig at API container start` has already been removed by moby#22570 so this fix changes `Target For Removal In Release: v1.12` to `Removed In Release: v1.12`. 4. `Docker search 'automated' and 'stars' options` has not been removed yet so this fix changes `Removed In Release: v1.14` to `Target For Removal In Release: v1.14` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
- What I did
According to https://docs.docker.com/engine/deprecated/#hostconfig-at-api-container-start passing
HostConfig
to the container start API will be removed in 1.12.This PR removed the deprecated feature and the related test cases.
- How I did it
Remove the related code.
Raise an error when the user tries to pass HostConfig when calling
POST /containers/xxx/start
API.- How to verify it
Call the container start API with HostConfig and check the error message.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Shijiang Wei mountkin@gmail.com