chore(deps): retire docker/docker via testenv migration (Aikido)#1075
Closed
dorothyyzh wants to merge 3 commits into
Closed
chore(deps): retire docker/docker via testenv migration (Aikido)#1075dorothyyzh wants to merge 3 commits into
dorothyyzh wants to merge 3 commits into
Conversation
…Aikido) Retire `github.com/docker/docker` from this module by: 1. Bumping the three upstreams that previously pulled docker/docker: - `qor5/x/v3` v3.2.1-0.20251126082016-f61128fc8187 -> pseudo from qor5/x#582 - `qor5/go-bus` -> pseudo from qor5/go-bus#20 - `theplant/relay` v0.8.0 -> pseudo from theplant/relay#35 All three already dropped docker/docker themselves. 2. Replacing `theplant/testenv` usage in 15 `_test.go` files with `qor5/x/v3/gormx.OpenContainer` + plain `gorm.Open`. testenv was the only remaining transitive path bringing docker/docker into admin's go.mod. Why `gormx.OpenContainer` rather than `gormx.SetupDatabase`: SetupDatabase installs `OmitAssociationsPlugin` globally on the returned *gorm.DB, which omits GORM associations on every Create/Update/Delete. Admin tests (especially activity, pagebuilder, seo) exercise associations, so this side effect would silently break them. The lighter OpenContainer + plain gorm.Open mirrors the prior testenv behavior 1:1. Migrated files (all DB-only, no Redis): activity/builder_test.go activity/tests/gorm_test.go autocomplete/integration/autocomplete_test.go cmd/qor5/website-template/admin/integration_test.go docs/docsrc/examples/examples_admin/db_test.go docs/docsrc/examples/examples_admin/publish_test/env_test.go docs/docsrc/examples/examples_presets/presets_test.go example/integration/pagebuilder_test.go media/integration/integration_test.go pagebuilder/publish_test.go presets/integration/example_test.go publish/publish_test.go redirection/redirection_test.go seo/helper_test.go worker/integration_test/setup_test.go Verification: - `go vet ./...` clean (except a pre-existing unreachable-code warning in pagebuilder/model_events.go:101 that also exists on main) - `go test -run=NoRealTests` typechecks all migrated packages cleanly - Real test runs verified on activity, seo, redirection (containers come up, GORM operations succeed) - `go mod why github.com/docker/docker` -> not needed - `docker/docker` no longer in `go.mod` - `theplant/testenv` no longer in `go.mod` `go build ./...` cannot complete on my local environment because `media/vips` is cgo-dependent (libvips/pkg-config) and the dev box doesn't have libvips installed. This affects only media/vips and is a pre-existing environment issue (same error on main). All other packages build cleanly. DRAFT — depends on upstream merges: - qor5/go-bus#20 - theplant/ratelimiter#14 - qor5/x#582 (depends on the above two) - theplant/relay#35 (depends on qor5/x#582) Pseudo-versions will be re-pointed to release tags before this PR is marked ready for review. Aikido group 25543337 (CVE-2026-33997 / CVE-2026-34040). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Go | May 13, 2026 7:29a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Replace OpenContainer + gorm.Open hand-wiring in all 15 admin _test.go files with the new MustStartRawTestSuite helper (qor5/x f23cd74e). Equivalent behavior in fewer lines, with lifecycle-managed container teardown. Plain MustStartTestSuite was not an option here: SetupDatabase installs OmitAssociationsPlugin / TracingPlugin, which silently change GORM semantics (some admin tests exercise associations) and pollute test output with JSON log lines. Verification: - `go vet ./...` clean except a pre-existing pagebuilder/model_events.go:101 unreachable-code warning (also present on main) - `go test ./activity/... ./seo/... ./redirection/...` pass (containers come up, GORM operations succeed) - `docker/docker` still absent from go.mod `go build ./...` can't complete locally — media/vips needs libvips/pkg-config (pre-existing env issue, same on main); CI should verify that package. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Retire
github.com/docker/dockerfrom this module by:docker/dockerto their dropped-docker/docker branches:qor5/x/v3→ qor5/x#582qor5/go-bus→ qor5/go-bus#20theplant/relay→ theplant/relay#35github.com/theplant/testenvusage in 15_test.gofiles withqor5/x/v3/gormx.OpenContainer+ plaingorm.Open.Why
docker/dockeris frozen atv28.5.2+incompatibleon the Go module proxy — moby moved Go-module publishing togithub.com/moby/moby/api. Aikido flagsdocker/dockerfor CVE-2026-33997 / 34040 (group 25543337) for which no fix can ship via the legacy module path.theplant/testenv@v0.2.1(HEAD, unreleased ~10 months) directly importsdocker/docker/api/types/containerand was the last remaining transitive path bringingdocker/dockerinto admin'sgo.mod(after the upstream bumps above retired the other paths).Changes
15 test files migrated off testenv → gormx (all DB-only, no Redis)
activity/builder_test.godbactivity/tests/gorm_test.godbautocomplete/integration/autocomplete_test.goTestDBcmd/qor5/website-template/admin/integration_test.goTestDBdocs/docsrc/examples/examples_admin/db_test.goTestDBdocs/docsrc/examples/examples_admin/publish_test/env_test.goDBdocs/docsrc/examples/examples_presets/presets_test.goTestDBexample/integration/pagebuilder_test.goTestDBmedia/integration/integration_test.goTestDBpagebuilder/publish_test.goTestDBpresets/integration/example_test.goTestDBpublish/publish_test.goTestDBredirection/redirection_test.goTestDBseo/helper_test.godbForTestworker/integration_test/setup_test.godbSame swap in each:
go.mod / go.sum
qor5/x/v3v3.2.1-0.20251126082016-f61128fc8187 → pseudo from PR Fix menu group item permission #582qor5/go-busv0.0.0-20250731113321-2c127f29aaaa → pseudo from PR Upgrade qor5/ui to move stripeui #20theplant/relayv0.8.0 → pseudo from PR fix field test #35theplant/testenvv0.2.1 → removeddocker/dockerv28.5.2+incompatible → removedtestcontainers-gotransitively bumped 0.38.0 → 0.42.0Why
gormx.OpenContainerrather thangormx.SetupDatabaseSetupDatabaseinstallsOmitAssociationsPluginglobally on the returned*gorm.DB, which omits GORM associations on every Create/Update/Delete. Several admin packages (activity, pagebuilder, seo, publish) exercise GORM associations in their tests, so this side effect would silently break them. The lighterOpenContainer+ plaingorm.Openmirrors the priortestenvbehavior 1:1.Verification
go vet ./...clean (except a pre-existingunreachable codewarning inpagebuilder/model_events.go:101that also exists onmain)go test -run='^$' -count=1 ./...typechecks all migrated packages cleanly./activity/...,./seo/...,./redirection/...— containers come up, GORM operations succeedgo mod why github.com/docker/docker→(main module does not need package github.com/docker/docker)docker/dockerno longer in go.modtheplant/testenvno longer in go.modgo build ./...can't complete locally becausemedia/vipsis cgo-dependent (libvips / pkg-config) and the dev environment doesn't have libvips. This affects onlymedia/vipsand is a pre-existing environment issue (same error reproduces onmain). All other packages build cleanly.Merge plan
qor5/x/v3,qor5/go-bus,theplant/relayto the release tagsDeployment note
Skill opens this PR; it does not touch any
release-*branch.