Skip to content

Add image tag command - #65

Draft
chruffins wants to merge 11 commits into
mainfrom
hypeship/image-tag
Draft

Add image tag command#65
chruffins wants to merge 11 commits into
mainfrom
hypeship/image-tag

Conversation

@chruffins

@chruffins chruffins commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

summary

Adds hypeman tag SOURCE TARGET for the local image-tag API in kernel/hypeman#453.

  • Sends POST /images/{source}/tag with { "target": "..." }.
  • URL-escapes source references so repository paths work correctly.
  • Keeps server errors, including missing and not-ready images, visible to callers.
  • Makes one-argument hypeman push TARGET use a matching local Docker image when present, then fall back to a ready Hypeman image or Docker staging.
  • Keeps hypeman push SOURCE TARGET for pushing a cached image to a different remote reference.

new UX

hypeman tag alpine:latest 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:v1
hypeman push 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:v1

The tag operation does not pull or reconvert image content. It creates a local alias through the server-side API. --format, --transform, and --debug continue to work with the command.

validation

  • go test ./...

Depends on the image tag API in kernel/hypeman#453.

Comment thread pkg/cmd/pushcmd.go
if err := waitForImageReady(ctx, &client, cachedImage); err != nil {
return err
}
return runRemotePush(ctx, cmd, target, target)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cached push skips newer Docker image

High Severity

A successful Images.Get now short-circuits staging, so one-arg hypeman push TARGET never reloads Docker when that tag already exists in Hypeman. Rebuilds that retag the same name and push again keep shipping the previous cached digest, including when the cached record is failed and waitForImageReady errors out. The still-documented docker tag then hypeman push TARGET loop is the common path this breaks.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5010e06. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 61d1aca. Configure here.

Comment thread pkg/cmd/tag.go Outdated
staged, stageErr := stageDockerImage(ctx, cmd, &client, source, target)
if stageErr != nil {
return fmt.Errorf("image %q was not found in Hypeman or Docker: %w", source, stageErr)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag errors claim image not found

Low Severity

Every stageDockerImage failure is wrapped as if the image was missing. Upload, wait, and follow-up GET errors are reported as not found in Hypeman or Docker for tag, and as a failed local Docker load for one-argument push, including cases where Docker load already succeeded.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 61d1aca. Configure here.

@chruffins

Copy link
Copy Markdown
Contributor Author

note on the raw client.Post in pkg/cmd/tag.go: it's a stopgap — hypeman-go v0.24.0 has no typed Images.Tag yet. once the tag API from kernel/hypeman#453 is generated into hypeman-go, switch handleTag to the typed method and drop the hand-rolled path (tracked with a TODO at the call site). nothing here blocks on that; the wire format won't change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant