Replaced buildctl CLI shell-out with direct gRPC communication via buildkit-client crate. Connects to buildkitd daemon over Unix socket or TCP with optional TLS. Implementation: - connect() with custom tonic UnixStream connector - execute_build() implementing the solve protocol directly against ControlClient (session setup, file sync, frontend attributes) - Extracts digest from containerimage.digest in solve response Added custom lima template (test/lima/wfe-test.yaml) that provides both buildkitd and containerd with host-forwarded Unix sockets for reproducible integration testing. E2E tests against real buildkitd daemon via WFE_BUILDKIT_ADDR env var. 54 tests total. 89% line coverage (cargo-llvm-cov with E2E).
31 lines
924 B
TOML
31 lines
924 B
TOML
[package]
|
|
name = "wfe-buildkit"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
homepage.workspace = true
|
|
description = "BuildKit image builder executor for WFE"
|
|
|
|
[dependencies]
|
|
wfe-core = { workspace = true }
|
|
tokio = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
tracing = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
regex = { workspace = true }
|
|
buildkit-client = { git = "https://github.com/AprilNEA/buildkit-client.git", branch = "master", default-features = false }
|
|
tonic = "0.12"
|
|
tower = "0.4"
|
|
hyper-util = { version = "0.1", features = ["tokio"] }
|
|
uuid = { version = "1", features = ["v4"] }
|
|
tokio-stream = "0.1"
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
tokio = { workspace = true, features = ["test-util"] }
|
|
tokio-util = "0.7"
|