Skip to content

Commit fe90f99

Browse files
matejvasekknative-prow-robot
authored andcommitted
fix: workaround podman bug wrt error reporting
In case that the image registry hostname is not resolvable podman now return error in bad JSON shape so it's not decodable by client. For now we assume that '500.*but provided no error-message' means hostname resolution error. Signed-off-by: Matej Vašek <matejvasek@gmail.com>
1 parent e77aad8 commit fe90f99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/docker/pusher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ func (n *Pusher) pushImage(ctx context.Context, f fn.Function, credentials oci.C
194194
errStr := err.Error()
195195
if strings.Contains(errStr, "no such host") ||
196196
strings.Contains(errStr, "failure in name resolution") ||
197-
regexp.MustCompile(`lookup .*: server misbehaving`).MatchString(errStr) {
197+
regexp.MustCompile(`lookup .*: server misbehaving`).MatchString(errStr) ||
198+
regexp.MustCompile(`500.*but provided no error-message`).MatchString(errStr) {
198199
// push with custom transport to be able to push into cluster private registries
199200
return n.push(ctx, f, credentials, output)
200201
}

0 commit comments

Comments
 (0)