8000 New Docker+Buildkit client by michaeldwan · Pull Request #2327 · replicate/cog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

New Docker+Buildkit client #2327

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

Merged
merged 51 commits into from
May 21, 2025
Merged

New Docker+Buildkit client #2327

merged 51 commits into from
May 21, 2025

Conversation

michaeldwan
Copy link
Member
@michaeldwan michaeldwan commented May 14, 2025

Depends on #2344 merged!

Now depends on #2353

This PR adds a new command.Command implementation (gonna rename that to docker.Client soon) that interacts with backends using the docker client and buildkit client packages. Although there's no meaningful end user improvements here beyond bug fixes and a modest ~10% build & predict performance boost, this change exposes the low-level APIs we need for upcoming work on high performance model packaging and delivery.

The existing client will remain the default for now, and this new one can be enabled with COG_DOCKER_SDK_CLIENT=1. The integration tests are currently testing both clients in parallel. Once we're feeling good about it we can make it default and rip the old one out.

@michaeldwan michaeldwan force-pushed the md/docker-api-client-1 branch from 93a8844 to 238d053 Compare May 15, 2025 22:37
helpers to map errors from different backends to known types. needed to support both clients
@michaeldwan michaeldwan changed the base branch from main to md/docker-sdk-client-prep May 16, 2025 23:11
@michaeldwan michaeldwan changed the title wip sdk client New Docker+Buildkit client May 16, 2025
@michaeldwan michaeldwan marked this pull request as ready for review May 16, 2025 23:37
@michaeldwan michaeldwan requested review from a team and Copilot May 16, 2025 23:37
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new Docker SDK–based client alongside the existing CLI client and wires it through tests and CI.

  • Introduce TestDockerA 10000 PIClient to validate the new SDK client in tests
  • Switch NewClient to return the SDK client when enabled
  • Add BuildKit integration (buildkit.go + build_secrets.go) and registry auth loading
  • Update CI to run both clients via a matrix on COG_DOCKER_SDK_CLIENT

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/docker/docker_client_test.go Add TestDockerAPIClient for SDK client tests
pkg/docker/docker.go Return SDK client in NewClient instead of panic
pkg/docker/credentials.go Load Docker registry auth via SDK types
pkg/docker/command/command.go Add Secrets and BuildArgs to build options
pkg/docker/buildkit.go New BuildKit–based implementation
pkg/docker/build_secrets.go Parse BuildKit secrets inputs
go.mod Pull in BuildKit, gRPC, and CSV-value deps
.github/workflows/ci.yaml Add new_docker_api_client matrix for CI runs
Comments suppressed due to low confidence (1)

pkg/docker/command/command.go:32

  • [nitpick] Either perform the rename now or add a clear migration path; leaving mismatched field names can cause confusion.
// TODO[md]: ImageName should be renamed to Tag

Base automatically changed from md/docker-sdk-client-prep to main May 19, 2025 18:28
@michaeldwan michaeldwan enabled auto-merge (squash) May 20, 2025 17:07
@michaeldwan michaeldwan merged commit 7710952 into main May 21, 2025
23 of 24 checks passed
@michaeldwan michaeldwan deleted the md/docker-api-client-1 branch May 21, 2025 18:11
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
0