mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #387] feat(image): manage image tags #396
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#396
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/387
Author: @Primary33
Created: 10/16/2026
Status: 🔄 Open
Base:
main← Head:feat/image-tags📝 Commits (2)
2c295ebfeat: build and publish reusable images with the CLIfe45aeffeat(image): manage image tags📊 Changes
38 files changed (+3994 additions, -275 deletions)
View changed files
📝
crates/aenv/src/client/templates.rs(+10 -0)📝
crates/aenv/src/commands/build.rs(+116 -32)📝
crates/aenv/src/commands/pull.rs(+1 -0)📝
crates/aenv/src/main.rs(+1 -1)📝
docs/src/concepts/sandboxes/starting.md(+61 -1)📝
scripts/buildkit/test.py(+40 -0)📝
services/gateway/internal/metrics.go(+5 -1)📝
services/gateway/internal/metrics_test.go(+13 -0)➕
src/api/generated/src/apis/images.rs(+99 -0)📝
src/api/generated/src/apis/mod.rs(+1 -0)📝
src/api/generated/src/models.rs(+746 -53)📝
src/api/generated/src/server/mod.rs(+459 -0)📝
src/api/impls/image_build.rs(+223 -85)📝
src/api/impls/image_build/cleanup.rs(+9 -3)➕
src/api/impls/image_build/record.rs(+206 -0)📝
src/api/impls/image_build/tests.rs(+388 -5)📝
src/api/impls/image_build/worker.rs(+5 -5)➕
src/api/impls/images.rs(+271 -0)📝
src/api/impls/mod.rs(+1 -0)📝
src/api/impls/template.rs(+85 -13)...and 18 more files
📄 Description
What
Manage image tags after a build:
POST /images/tagspoints more tags of an image name at the image an existing tag of that name points to,DELETE /images/tagsremoves tags of a name, andGET /images/{name}/tagslists a name's tags with their digests and assignment times.Why
#347 assigns tags only when an image is built, so promoting an image (for example pointing
web:prodat the image ofweb:v1) or removing a tag requires a rebuild. Split out of #347 during review so the build flow and the tag API can be reviewed separately.Related issue
N/A. Depends on #347. Review this feature only. Design proposal: #378. The image catalog (#359) will be rebased onto this change.
Scope and non-goals
Tag assignment, listing, and deletion. The tag storage format,
aenv/name:tagresolution, and build-time tagging are in #347. Listing image names and inspecting or deleting images by digest are in #359. Protected tags are out of scope.Design and behavior changes
POST /images/tags {"target": "web:v1", "tags": ["prod"]}returns201 {tags, imageDigest}, or404when the target tag does not point to a published image.DELETE /images/tags {"name": "web", "tags": ["prod"]}is idempotent and never deletes the image.GET /images/{name}/tagsreturns[{tag, imageDigest, createdAt}]in tag order. It readsimages/tags/{name}/through a newDocumentCollection::ImageTags(name); the collection now carries data, so it is no longerCopy, and the OSS and POSIX listing code takes it by reference./volumes; only the metric labels/images/tagsand/images/{name}/tagsare added.Compatibility and operations
POSTandDELETE /images/tagsandGET /images/{name}/tags(OpenAPI tagimages), with the regenerated server.Validation
Based on #347 at
2c295eb(onb086553). The checks below ran on06ec1d5, whose tree is identical tofe45aef. Run on a Linux test host as a non-root user with isolatedAENV_TEST_STATE_DIRandAENV_TEST_DEPS_PATH:make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons: the integration test config sets
[pool.block] enabled = true, because with a config file the ublk daemon reads pool settings only from that file and a partial file disables the pool; this is already the case on main. The cross-node check ran as two isolated servers on one host. Benchmarks: not applicable.Risks and reviewer notes
Review
src/api/impls/images.rs(assignment, listing, and deletion semantics) and the per-name collection insrc/repository/layout.rsandsrc/image/catalog.rs. Everything undersrc/api/generatedis generated from thesrc/api/openapi.ymlchanges.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.