Skip to content

Commit b6bbb8f

Browse files
committed
Clarify cached-image readiness errors and note SDK follow-up
1 parent adea978 commit b6bbb8f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎pkg/cmd/pushcmd.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ func handleRemotePushTarget(ctx context.Context, cmd *cli.Command, target string
115115
fmt.Fprintf(os.Stderr, "Docker image %s not available (%v); trying the Hypeman cache...\n", target, loadErr)
116116
cachedImage, err := client.Images.Get(ctx, url.PathEscape(target))
117117
if err == nil {
118+
// A cached record that never became ready deserves a push-specific
119+
// message; the shared helper's "image build failed" reads odd here.
118120
if err := waitForImageReady(ctx, &client, cachedImage); err != nil {
119-
return err
121+
return fmt.Errorf("cached image %s is not ready: %w", target, err)
120122
}
121123
return runRemotePush(ctx, cmd, target, target)
122124
}

‎pkg/cmd/tag.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ func handleTag(ctx context.Context, cmd *cli.Command) error {
4242

4343
var res []byte
4444
opts = append(opts, option.WithResponseBodyInto(&res))
45+
// TODO: switch to a typed Images.Tag once the tag API from kernel/hypeman#453
46+
// is generated into hypeman-go.
4547
body := struct {
4648
Target string `json:"target"`
4749
}{Target: target}

0 commit comments

Comments
 (0)