Skip to content

fix(cli-go): avoid incompatible compose dependency#5466

Closed
jgoux wants to merge 1 commit into
dependabot/go_modules/apps/cli-go/github.com/compose-spec/compose-go/v2-2.11.0from
codex/fix-pr-5461-ci
Closed

fix(cli-go): avoid incompatible compose dependency#5466
jgoux wants to merge 1 commit into
dependabot/go_modules/apps/cli-go/github.com/compose-spec/compose-go/v2-2.11.0from
codex/fix-pr-5461-ci

Conversation

@jgoux
Copy link
Copy Markdown
Contributor

@jgoux jgoux commented Jun 4, 2026

Targets the Dependabot branch for #5461.

compose-go/v2@2.11.0 changes CreateHostPath from bool to types.OptOut, but docker/compose/v2@2.40.3 still expects the old bool API and no newer v2 module is available. This caused the Go CLI build and lint jobs to fail while compiling Docker Compose internals.

The start command only used Docker Compose for best-effort image prefetching before the actual Supabase container startup path. This replaces that helper with direct Docker inspect/pull calls through the existing retrying Docker client, keeps missing-image pulls parallel like Compose did, de-dupes repeated image tags, and removes the now-unused Compose dependency tree.

Added a fake-Docker regression test that verifies missing image pulls overlap concurrently.

@jgoux jgoux requested a review from a team as a code owner June 4, 2026 08:25
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 4, 2026

Coverage Report for CI Build 26941969079

Warning

No base build found for commit cd636b4 on dependabot/go_modules/apps/cli-go/github.com/compose-spec/compose-go/v2-2.11.0.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 64.05%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15808
Covered Lines: 10125
Line Coverage: 64.05%
Coverage Strength: 7.09 hits per line

💛 - Coveralls

Comment thread apps/cli-go/internal/start/start.go Outdated
Comment on lines +197 to +211
func pullImages(ctx context.Context, project types.Project) {
cli := &RetryClient{Client: utils.Docker}
for _, service := range project.Services {
if len(service.Image) == 0 {
continue
}
if _, err := cli.ImageInspect(ctx, service.Image); err == nil {
continue
}
out, err := cli.ImagePull(ctx, service.Image, image.PullOptions{})
if err != nil {
continue
}
_, _ = io.Copy(io.Discard, out)
_ = out.Close()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question

Will that still pull images in parallels like compose did ? I believe this might hit start time badly if it doesn't.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, we want to keep the dep on docker compose just for the "nice output" in parallel.
I have another PR to upgrade both docker and compose so we can keep using them.

compose-go v2.11.0 changes CreateHostPath from bool to types.OptOut, but docker/compose/v2 v2.40.3 still expects the old bool API and no newer v2 module is available. This made cli-go fail to compile during CI after the Dependabot compose-go bump.

The start command only used docker/compose for best-effort image prefetching, not stack orchestration. Replace that helper with direct Docker inspect/pull calls using the existing retrying Docker client, keep missing-image pulls parallel like Compose did, de-dupe repeated image tags, and tidy the now-unused compose dependency tree.
@jgoux jgoux force-pushed the codex/fix-pr-5461-ci branch from 7f10627 to f383466 Compare June 4, 2026 09:02
@jgoux jgoux closed this Jun 4, 2026
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