Skip to content

Remove docker module dependency#1399

Open
pedro-a-n-moreira wants to merge 1 commit into
golang-migrate:masterfrom
pedro-a-n-moreira:codex/remove-docker-module-dep
Open

Remove docker module dependency#1399
pedro-a-n-moreira wants to merge 1 commit into
golang-migrate:masterfrom
pedro-a-n-moreira:codex/remove-docker-module-dep

Conversation

@pedro-a-n-moreira

Copy link
Copy Markdown

What changed

This removes the root module dependency on github.com/docker/docker by moving the Docker test helper code to Moby's split api and client modules.

It also replaces the external github.com/dhui/dktest test helper with an in-repo compatibility helper package backed by the same Moby split modules. Database integration tests now import github.com/golang-migrate/migrate/v4/dktest.

Why

github.com/docker/docker currently pulls multiple Dependabot alerts into downstream projects that only import golang-migrate's runtime packages. Those projects do not use golang-migrate's Docker test helpers, but the dependency appears in the root module graph.

Using Moby's split modules keeps the Docker-based test helper behavior available while removing the vulnerable monolithic Docker SDK module from consumers' dependency graphs.

Validation

  • go test ./dktest ./dktesting ./testing
  • go test ./database/... -run '^$'
  • go list -m all | rg 'github.com/docker/docker|github.com/dhui/dktest' returns no matches

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 52.375% (-2.1%) from 54.432% — pedro-a-n-moreira:codex/remove-docker-module-dep into golang-migrate:master

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.

2 participants