mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #247] [CLOSED] feat: build templates with managed BuildKit workers #290
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/247
Author: @yingdi-shan
Created: 9/5/2026
Status: ❌ Closed
Base:
main← Head:feat/template-buildkit📝 Commits (3)
60b6da8feat(image): import BuildKit content into OverlayBD cache928cdb3feat(templates): manage reusable BuildKit workers and volume publication2dcf04ffeat(cli): build Dockerfiles with bundled BuildKit and document lifecycle📊 Changes
80 files changed (+6733 additions, -813 deletions)
View changed files
📝
.github/workflows/integration-tests.yml(+21 -0)📝
.github/workflows/release.yml(+1 -0)📝
Cargo.lock(+7 -10)📝
Makefile(+10 -1)📝
build.rs(+6 -0)➕
config/buildkit-version(+1 -0)📝
config/default.toml(+7 -0)📝
crates/aenv/Cargo.toml(+2 -2)➕
crates/aenv/src/client/buildkit.rs(+199 -0)📝
crates/aenv/src/client/mod.rs(+6 -0)📝
crates/aenv/src/commands/build.rs(+377 -515)📝
crates/aenv/src/main.rs(+2 -2)📝
crates/aenv/src/progress.rs(+60 -0)📝
deploy/docker-compose.yml(+6 -0)📝
docs/src/concepts/templates.md(+141 -21)📝
docs/src/concepts/volumes.md(+7 -0)📝
docs/src/configuration/reference.md(+16 -8)📝
docs/src/deployment/docker-compose.md(+9 -0)📝
docs/src/getting-started/aenv-cli.md(+35 -8)➕
scripts/buildkit/README.md(+45 -0)...and 60 more files
📄 Description
Superseded by three focused PRs:
All three target
main. The tested integration commit preserves this PR's combined runtime implementation on currentmainand records the shared-file reconciliation. Validation and merge-order notes are in the replacement PRs. This branch is retained for the original commits and review history.What
Replace the limited Dockerfile interpreter with BuildKit in managed microVMs.
aenv build <context> --name <name>transfers the context, imports the final image into OverlayBD, and publishes a runnable template. Ordinary sandboxes and builders preserve mounted volumes during deletion by freezing and sealing them without capturing VM state.Why
Support Dockerfile semantics and persistent instruction/cache-mount reuse, while avoiding disposable VM snapshots and filesystem journal replay during volume reuse.
Related issue
Close #147. The volume-layer hashing optimization remains separate in #249.
Scope and non-goals
CLI, node/gateway APIs, image import, worker/cache lifecycle, mounted-volume deletion, installation, tests, and documentation. Stage selection, SSH forwarding, remote/stdin contexts, and cross-platform emulation are outside this flow.
Design and behavior changes
Compatibility and operations
moby/buildkit:v0.33.0, 16 vCPUs, 32768 MiB memory, 262144 MiB cache. Build allocation validates cache capacity against the volume limit; ordinary APIs still work with smaller volume limits.aenv-buildctlbesideaenv, preserving systembuildctl. Both installers read the client pin from the same AgentENV release. No previous BuildKit/cache-format compatibility layer is included.Validation
make fmtandmake clippymake test-unit: 843 AgentENV tests, 4 capability-gated tests, 55 CLI tests, 3 Linux capability tests, 8 ublk tests, 46 daemon tests, and installer checks.make -C services testmake agentenv-server; generated bindings were regenerated, not manually edited.The single-node E2E CI job runs both BuildKit suites with a 2-vCPU, 2048-MiB builder and an 8192-MiB cache. The full Rust integration suite was not rerun during this revision.
Risks and reviewer notes
Concurrent builders multiply resource use. Shared cache access follows the repository's API-key trust boundary. Publication depends on storage throughput; freezing flushes filesystem data but cannot capture application buffers. Review deletion ordering in
src/orchestrator/service.rsand cache transactions insrc/snapshot/repository/.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.