Update the list of docker-remote-api capabilities #4765
Merged
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.
Summary
This PR updates the list of docker-remote-api capabilities that the agent reports to ECS during instance registration.
Every new Docker server release brings in new client API versions that it can support. Over time, the number of supported Docker API versions has grown significantly - currently at about 27. We have a limit on the number of capabilities that agent can send during instance registration, hence we stop reporting v1.33+. We are also going to stop reporting 1.26, 1.27, and 1.31, as these are unused. We need to continue reporting all other versions to support legacy ECS back-end logic.
This change give us a headroom of about 15 capabilities, while also stopping addition of new Docker remote API capabilities for every new Docker server version.
Implementation details
Updated the agent capability parsing to exclude unnwanted docker-remote-api capabilities.
Testing
New tests cover the changes: yes
I manually verified that the container instances no longer report the excluded capabilities.
I also verified that there are no customers (across all AWS regions) that rely on these unwanted docker-remote-api capabilities, via ECS task placement constraints.
Description for the changelog
Enhancement: Remove unwanted docker-remote-api capabilities
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions? No
Does this PR include the addition of new environment variables in the README? No, I also verified that there's no mention of docker-remote-api capabilities in the README and ECS public docs.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.