You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: e2e/testdata/fn-eval/error-in-pipe/.expected/config.yaml
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,11 @@ stdErr: |
21
21
Stderr:
22
22
"[error] /// : failed to configure function: input namespace cannot be empty"
23
23
Exit code: 1
24
-
24
+
25
25
26
26
[RUNNING] "gcr.io/kpt-fn/dne"
27
27
[FAIL] "gcr.io/kpt-fn/dne" in 0s
28
-
Error: Function image "gcr.io/kpt-fn/dne" doesn't exist
28
+
Stderr:
29
+
"docker: Error response from daemon: manifest for gcr.io/kpt-fn/dne:latest not found: manifest unknown: Failed to fetch \"latest\" from request \"/v2/kpt-fn/dne/manifests/latest\"."
fmt.Sprintf("pull image before running the container. It must be one of %s, %s and %s.", fnruntime.AlwaysPull, fnruntime.IfNotPresentPull, fnruntime.NeverPull))
@@ -250,3 +194,48 @@ func (e *ContainerImageError) Error() string {
250
194
"Error: Function image %q doesn't exist remotely. If you are developing new functions locally, you can choose to set the image pull policy to ifNotPresent or never.\n%v",
251
195
e.Image, e.Output)
252
196
}
197
+
198
+
// filterDockerCLIOutput filters out docker CLI messages
199
+
// from the given buffer.
200
+
funcfilterDockerCLIOutput(in io.Reader) string {
201
+
s:=bufio.NewScanner(in)
202
+
varlines []string
203
+
204
+
fors.Scan() {
205
+
txt:=s.Text()
206
+
if!isdockerCLIoutput(txt) {
207
+
lines=append(lines, txt)
208
+
}
209
+
}
210
+
returnstrings.Join(lines, "\n")
211
+
}
212
+
213
+
// isdockerCLIoutput is helper method to determine if
214
+
// the given string is a docker CLI output message.
215
+
// Example docker output:
216
+
// "Unable to find image 'gcr.io/kpt-fn/starlark:v0.3' locally"
fmt.Sprintf("pull image before running the container. It must be one of %s, %s and %s.", fnruntime.AlwaysPull, fnruntime.IfNotPresentPull, fnruntime.NeverPull))
66
66
r.Command.Flags().StringVar(
67
67
&r.Selector.APIVersion, "match-api-version", "", "select resources matching the given apiVersion")
0 commit comments