Skip to content

Commit 3f9df74

Browse files
fix: workaround podman bug wrt error reporting (#3478)
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> Co-authored-by: Matej Vašek <matejvasek@gmail.com>
1 parent e77aad8 commit 3f9df74

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)