@@ -22,7 +22,6 @@ import (
22
22
23
23
"github.com/aws/amazon-ecs-agent/agent/config"
24
24
"github.com/aws/amazon-ecs-agent/agent/dockerclient"
25
- "github.com/aws/amazon-ecs-agent/agent/dockerclient/dockerapi"
26
25
dm "github.com/aws/amazon-ecs-agent/agent/engine/daemonmanager"
27
26
"github.com/aws/amazon-ecs-agent/ecs-agent/api/ecs/model/ecs"
28
27
"github.com/aws/amazon-ecs-agent/ecs-agent/logger"
@@ -208,13 +207,8 @@ func (agent *ecsAgent) capabilities() ([]*ecs.Attribute, error) {
208
207
209
208
supportedVersions := make (map [dockerclient.DockerVersion ]bool )
210
209
// Determine API versions to report as supported via com.amazonaws.ecs.capability.docker-remote-api.X.XX capabilities
211
- // We advertise all known versions here rather than "supported" versions. The reason for this is that ECS backend
212
- // adds required capabilities to some features at the minimum supported version. If this is less than our Minimum
213
- // supported version (currently 1.24), then the capability will not match.
214
- // In other words, here we advertise supporting docker api versions that this agent may not actually support, for the
215
- // sake of task definition required attributes.
216
- // TODO edit this comment ^
217
- for _ , version := range dockerapi .SupportedVersionsExtended (agent .dockerClient ) {
210
+ // and for determining which features we support that depend on specific docker API versions
211
+ for _ , version := range dockerclient .SupportedVersionsExtended (agent .dockerClient .SupportedVersions ) {
218
212
capabilities = appendNameOnlyAttribute (capabilities , capabilityPrefix + "docker-remote-api." + string (version ))
219
213
supportedVersions [version ] = true
220
214
}
0 commit comments