Add tag command for existing local images - #66
Closed
chruffins wants to merge 1 commit into
Closed
Conversation
chruffins
force-pushed
the
hypeship/image-tag-cmd
branch
from
August 26, 2026 16:22
42e8bc7 to
281a39d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
Adds
hypeman tag <source> <target>, a top-level command (alongsidepull/push) that creates a local Hypeman alias for an image that already exists locally — no pull, no reconvert. The target may use a different repository; both references share the same server-side content.Matches the prior intent from #65 for the command shape (top-level
tag,<source> <target>, body{"target": ...}, auto output prints the normalized image name), without #65's Docker-staging fallback or the one-argpushchanges — those are separate concerns./images/{source}/tagwith{"target": "<target>"}(URL-encoded source in the path), the endpoint added in Add local image tagging on shared content storage hypeman#453 (stacked on the content-addressed storage groundwork in Move image references to shared content storage hypeman#449).autoprints the normalized image name;--format json|yaml|...prints the API response;--transformand--debugapply.client.Postuntil the generated SDK ships the typedimages.tagmethod (the stlc previewstlc/preview/pr-453already has it); swapping is a follow-up once an SDK release is out.Depends on the server endpoint landing first (kernel/hypeman#453); kept as a draft until then.
validation
go build ./...— passgo test ./... -count=1— pass, including:TestTagCommand_PostsToTagEndpoint— runs the real command tree against an httptest server; asserts method, URL-encoded path (/images/docker.io%2Flibrary%2Falpine:latest/tag), JSON body{"target":...}, and that auto output prints the resolved nameTestTagCommand_RequiresSourceAndTarget— usage error unless exactly two referencesTestTagCommand_SurfacesServerError— server 404 surfaces as a CLI error