-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
info: remove printServerWarningsLegacy #4808
info: remove printServerWarningsLegacy #4808
Conversation
Docker Engine 18.09 (API v1.39) introduced a Warnings field in the into response. This enhancement was not gated by API version (see [moby/moby@a3d4238]), and will be returned by Docker Engine 18.09 and up, regardless of the API version chosen. Likewise, the client-side code was written to prefer warnings returned by the daemon, but to fall back on client-side detection of missing features based on information in the Info response (see [docker/cli@3c27ce2]). Thse warnings are purely informational, and given that Docker Engine versions before 18.09 have reached EOL 6 Years ago, and any current version of the Engine now returns the Warnings, it should be safe to remove the client-side fall back logic. This patch removes the client-side fall back code for warnings that was added in 3c27ce2. [moby/moby@a3d4238]: moby/moby@a3d4238 [docker/cli@3c27ce2]: docker@3c27ce2 Signed-off-by: Sebastiaan van Stijn <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4808 +/- ##
==========================================
- Coverage 59.63% 59.58% -0.05%
==========================================
Files 287 287
Lines 24777 24741 -36
==========================================
- Hits 14775 14742 -33
+ Misses 9114 9112 -2
+ Partials 888 887 -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
How do we handle comms when removing cli features necessary for EOL versions of the engine? Anything special that needs to be done?
So far, the CLI "supported" all versions of docker since 1.0.0; most of that is based on API version; the client can downgrade to older versions of the API, where needed changing API calls, or disabling features not yet supported. And the CLI itself has some detection as well; there's some flags and commands that are hidden when the CLI is connected to an older engine. Most of that was introduced to help transitioning to newer daemons, so for situations where a user updated the CLI to the latest version, but the server they connected to has not yet been updated (a more likely scenario in production setups, where you may not update your daemon to "new version" on day one). Before API version negotiation, users often ran into "this daemon is too old" errors. API versions before "previous" should work (as mentioned, all the way back to v1.0.0), but that should really be considered "best effort" (it should mostly work , but it's definitely not tested). If we actively deprecate features, we add those to the
In this case, the removed functionality was not essential, and would only be produced for (very) old, and long EOL versions of the daemon. Anyone still running those has a MUCH bigger problem. |
Thanks for the thorough explanation @thaJeztah! |
You're welcome! We should consider having some of this actually written up (I don't think expectations have ever been properly documented) /cc @dvdksn (low priority, just one to put in the back of your mind) |
Relates to:
Docker Engine 18.09 (API v1.39) introduced a Warnings field in the into response. This enhancement was not gated by API version (see moby/moby@a3d4238), and will be returned by Docker Engine 18.09 and up, regardless of the API version chosen.
Likewise, the client-side code was written to prefer warnings returned by the daemon, but to fall back on client-side detection of missing features based on information in the Info response (see docker/cli@3c27ce2).
Thse warnings are purely informational, and given that Docker Engine versions before 18.09 have reached EOL 6 Years ago, and any current version of the Engine now returns the Warnings, it should be safe to remove the client-side fall back logic.
This patch removes the client-side fall back code for warnings that was added in 3c27ce2.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)