chore(deps): bump go-bus + ratelimiter to retire docker/docker (Aikido)#582
Closed
dorothyyzh wants to merge 3 commits into
Closed
chore(deps): bump go-bus + ratelimiter to retire docker/docker (Aikido)#582dorothyyzh wants to merge 3 commits into
dorothyyzh wants to merge 3 commits into
Conversation
Bumps the two remaining transitive paths that pulled `github.com/docker/docker` into this module's `go.mod`: - `github.com/qor5/go-bus` -> pseudo-version pointing at qor5/go-bus#20 HEAD (migrates its tests off `testenv` to `gormx`). - `github.com/theplant/ratelimiter` v1.0.1 -> pseudo-version pointing at theplant/ratelimiter#14 HEAD (same migration pattern). With these two upstreams off `theplant/testenv` (the sole importer of `github.com/docker/docker/api/types/container`), MVS no longer pulls `docker/docker` into `qor5/x/v3`'s `go.mod`. Combined with PR #581 (`gormx` itself moved to `github.com/moby/moby/api`), this fully retires `github.com/docker/docker v28.5.2+incompatible` from this module's dependency graph. Verification: - `go build ./...` clean - `go vet ./...` clean - `go test ./...` pass (all packages — including ratelimiterx, gormx, exchange) - `go mod why github.com/docker/docker` -> not needed - `docker/docker` no longer in `go.mod` - `theplant/testenv` no longer in `go.mod` DRAFT until upstream PRs merge: - qor5/go-bus#20 - theplant/ratelimiter#14 After both merge + tag, the pseudo-versions above will be replaced with proper tags before merging this PR. Aikido group 25543337 (CVE-2026-33997 / CVE-2026-34040). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 13, 2026
Mirrors `gormx.OpenContainer` / `SetupContainer` but for Redis,
backed by `testcontainers-go/modules/redis`. Same API shape:
- `OpenContainer(ctx, *ContainerConfig) (*Container, error)`
- `SetupContainer(ctx, *lifecycle.Lifecycle, *ContainerConfig)` for
DI-managed cleanup
- `ContainerConfig` / `DefaultContainerConfig()`
- `Container { testcontainers.Container; Client *redis.Client }`
Exists because `theplant/testenv` (the only existing Redis container
helper in the org's Go ecosystem) still pins `github.com/docker/docker`
and is blocking the migration off it. Downstream consumers (theplant/
ratelimiter#14, and future syncx/admin needs) need a moby-only Redis
helper; rather than each forking its own `internal/testsupport`,
make this a first-class part of qor5/x next to gormx.
Verification:
- `go build ./redisx/...` clean
- `go vet ./redisx/...` clean
- `go test ./redisx/...` pass (smoke test: start container, Ping,
Set/Get round-trip)
- `go mod why github.com/docker/docker` still reports "not needed"
after the add — docker/docker remains absent from `go.mod`
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dorothyyzh
added a commit
to theplant/ratelimiter
that referenced
this pull request
May 13, 2026
qor5/x#582 now exposes a first-class `redisx` package mirroring `gormx`. Switch this repo's two Redis-using tests to the shared helper and drop the temporary `internal/testsupport/redis.go` that existed only to keep this PR independent. Net effect: same behavior, one fewer place to maintain a redis container helper across the org. Verification: - `go build ./...` clean - `go test ./...` pass (all 3 packages, ~10s) - `docker/docker` still absent from `go.mod` - `theplant/testenv` still absent from `go.mod` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MustStartTestSuite (existing) wires the full SetupDatabase data path,
which installs three production plugins:
- OmitAssociationsPlugin: silently omits GORM associations on
Create/Update/Delete (changes semantics for tests that exercise
associations)
- SoftDeleteUpdatedAtPlugin
- TracingPlugin: writes a JSON log line per query to the
appkit/log default sink (pollutes stdout/stderr — breaks any
`Example_*` test that relies on byte-exact output capture)
These behaviors are correct for production-like integration tests,
but they make MustStartTestSuite an unsafe drop-in replacement when
migrating tests off `github.com/theplant/testenv` (which was a plain
gorm.Open with no plugins).
MustStartRawTestSuite returns the same *TestSuite shape but skips
SetupDatabase entirely: it opens the connection with
`gorm.Open(postgres.Open(c.DSN), &gorm.Config{})`, equivalent to what
testenv.SetupDatabase did. Container teardown is still managed by the
lifecycle, so callers get the cleanup ergonomics (works correctly
across `os.Exit` because the lifecycle handles signals) without
silently changing GORM semantics or polluting test output.
Two callers to choose between:
- MustStartTestSuite -> production data path (3 existing callers
in qor5/x: gormx_test, postgresx_test,
ratelimiterx/grpc_test)
- MustStartRawTestSuite -> testenv-equivalent (the in-flight
migrations of theplant/relay,
theplant/ratelimiter, qor5/go-bus,
qor5/syncx, qor5/admin)
Verification:
- TestMustStartRawTestSuite: AutoMigrate + Create + First round-trip
- TestRawTestSuiteNoTracingOutput: captures stdout/stderr while
running migrations and a Create, asserts no `"caller":"trace.go`
JSON appears (i.e. tracing is NOT installed)
- Full `go test ./gormx/...` pass
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
Two changes that together retire
github.com/docker/dockerfromqor5/x/v3's dependency graph:qor5/go-busandtheplant/ratelimiterto pseudo-versions of their docker/docker-removal branches:qor5/go-bus→ branch HEAD of qor5/go-bus#20theplant/ratelimiterv1.0.1 → branch HEAD of theplant/ratelimiter#14redisxpackage — a first-class Redis test container helper, mirroringgormxfor Postgres. Exists so downstream consumers (theplant/ratelimiter, future syncx/admin Redis needs) don't have to depend ontheplant/testenv(which still pinsdocker/docker) or each fork their own internal helper.Combined with #581 (which already migrated
gormxitself offdocker/dockerontogithub.com/moby/moby/api), this fully retiresdocker/dockerfromqor5/x/v3's graph.Why
docker/dockeris frozen atv28.5.2+incompatibleon the Go module proxy — moby moved Go-module publishing togithub.com/moby/moby/apiandgithub.com/moby/moby/v2. Aikido flagsdocker/dockerfor CVE-2026-33997 / 34040 (group 25543337) for which no fix can ship via the legacy module path.qor5/xis the foundational library for alltheplant/*services — droppingdocker/dockerhere cascades into every downstream service (cms, consent, loyalty, pim, marketing, iam, ciam, adex, etc.).Changes
redisxpackage (new)Backed by
testcontainers-go/modules/redis(already moby-migrated in v0.42.0). 1 source file + 1 smoke test file (~135 lines total).go.mod(the dep bumps)github.com/qor5/go-bus v0.0.0-20250731113321-2c127f29aaaa→v0.1.1-0.20260513042224-f44a29d2650cgithub.com/theplant/ratelimiter v1.0.1→v1.0.2-0.20260513051226-060e61f4e5d3github.com/docker/docker v28.5.2+incompatible // indirect→ removedgithub.com/moby/{docker-image-spec,go-archive,patternmatcher,sys/sequential,sys/user,sys/userns,term}→ all removed (transitive cleanup)go.sumupdated to match.Verification
go build ./...cleango vet ./...cleango test ./...pass (all packages, includinggormx,redisx,gormx/postgresx,ratelimiterx,exchange)redisxsmoke test: container starts,Pingsucceeds,Set/Getround-trip succeedsgo 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.modMerge plan
go.modto point at the new tags (replace pseudo-versions)go mod tidy && go test ./...to confirmqor5/x(e.g. v3.3.0)qor5/xinqor5/syncx,qor5/admin,theplant/relay, and business servicesDeployment note
Skill opens this PR; it does not touch any
release-*branch.