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

Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent and /ecs-agent #3907

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

mythri-garaga
Copy link
Contributor

@mythri-garaga mythri-garaga commented Sep 13, 2023

Summary

Currently the dependabot PR #3895 to update the docker version from 20.10.24+incompatible to 24.0.6+incompatible in /agent is blocked due to backward incompatible dependancy changes in github.com/docker/docker/api/types/container/ and github.com/docker/docker/api/types/volume/. This is causing the static check and linux unit test failures in the PR #3895. This change includes some refactoring to fix the compatabilty and also upgrading the docker version in /ecs-agent module to 24.0.6+incompatible to maintain the same docker versions in both /agent and /ecs-agent(See #3768).

Implementation details

  1. Refactoring the type container.ContainerCreateCreatedBody to container.CreateResponse in

    • agent/dockerclient/sdkclient/interface.go
    • agent/dockerclient/dockerapi/docker_client_test.go
    • agent/dockerclient/sdkclient/mocks/sdkclient_mocks.go
    • agent/stats/common_test.go
  2. Refactoring the type from volume.VolumeCreateBody to volume.CreateOptions in

    • agent/dockerclient/sdkclient/interface.go
    • agent/dockerclient/dockerapi/docker_client.go
    • agent/dockerclient/dockerapi/docker_client_test.go
  3. Function signature of ContainerStop() in github.com/docker/docker/client changed from

    ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error
    

    to

    ContainerStop(ctx context.Context, containerID string, options container.StopOptions) error
    

    so updated the following files to reflect the change

    • agent/dockerclient/sdkclient/interface.go
    • agent/dockerclient/dockerapi/docker_client.go
    • agent/dockerclient/dockerapi/docker_client_test.go
    • agent/dockerclient/sdkclient/mocks/sdkclient_mocks.go
    • agent/stats/engine_integ_test.go
    • agent/stats/engine_unix_integ_test.go
    • agent/stats/engine_unix_integ_test.go
  4. Updated package name from types to volume in few places as the file github.com/docker/docker/api/types/volume.go was moved to new /volume folder (github.com/docker/docker/api/types/volume/volume.go).

    • agent/api/task/task_test.go
    • agent/api/task/taskvolume_test.go
    • agent/dockerclient/dockerapi/docker_client_test.go
    • agent/dockerclient/dockerapi/types.go
    • agent/dockerclient/sdkclient/mocks/sdkclient_mocks.go
    • agent/dockerclient/sdkclient/mocks/sdkclient_mocks.go
    • agent/taskresource/volume/dockervolume_test.go
  5. Scan() is now a member function of LocalRegistry - plugins: Move SpecPaths into LocalRegistry moby/moby#44789, updated the Scan() method in agent/utils/mobypkgwrapper/plugins.go based on these upstream changes.

Testing

New tests cover the changes: yes
Functional tests ran successfully on an AMI with an older docker version (19.03.13) and containerd version(1.4.13)

Description for the changelog

Enhancement: Update the docker version from 20.10.24+incompatible to 24.0.6+incompatible in /agent and /ecs-agent

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mythri-garaga mythri-garaga force-pushed the docker_upgrade branch 7 times, most recently from ab4b929 to 085d169 Compare September 13, 2023 23:55
@mythri-garaga mythri-garaga force-pushed the docker_upgrade branch 2 times, most recently from 15fd5b2 to c9e4d6d Compare September 19, 2023 19:55
@mythri-garaga mythri-garaga marked this pull request as ready for review September 20, 2023 18:10
@mythri-garaga mythri-garaga requested a review from a team as a code owner September 20, 2023 18:10
@mythri-garaga mythri-garaga changed the title [WIP] Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent Sep 20, 2023
@mythri-garaga mythri-garaga changed the title Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent and /ecs-agent Sep 20, 2023
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.24+incompatible to 24.0.6+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v20.10.24...v24.0.6)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent

update docker version in /ecs-agent
@mythri-garaga mythri-garaga merged commit a21bda4 into aws:dev Oct 11, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants