Skip to content

Optimize internal ListWorkers calls #2474

@tonistiigi

Description

@tonistiigi

Atm. every client.Build call calls ListWorkers internally https://github.com/moby/buildkit/blob/v0.13.2/client/build.go#L31 . Buildx makes one such call for build node to determine its capabilities, and another per build request. Docker driver makes additional call to detect Moby snapshotter capability. While the call is fast, it is still unnecessary and could be optimized to avoid that. It also shows up in opentelemetry trace and could be confusing.

Options could be to add some internal caching in buildkit client or allow passing the workers list into Build() with some option. Avoiding the request for Docker driver likely requires update to driver interface.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions