Skip to content

Commit cc91ac2

Browse files
authored
1 parent 322b1ab commit cc91ac2

File tree

11 files changed

+9761
-9706
lines changed

11 files changed

+9761
-9706
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,6 @@ require (
290290
replace (
291291
k8s.io/client-go => k8s.io/client-go v0.30.10
292292

293-
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead
293+
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad
294294
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb
295295
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,8 +1497,8 @@ github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaL
14971497
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
14981498
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb h1:pnk1Mw27NO/gntKymU4DDaRRbrGMY1a9Wu8hI2d/CK8=
14991499
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb/go.mod h1:AB3tJ9HfekmLRSMPgcevg5oxO6WwKVrYqchBajXZ1xc=
1500-
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead h1:HTJH0FL6h/b6oJYVIOhw23c2w5tzKzun8qq3fl4EobM=
1501-
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead/go.mod h1:9FVSpi1LvVlZ/JoNf5Z+sBCgLObzkVIHHvx9fSo5/mA=
1500+
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad h1:R727qHXX54tR4ALaJfEMRxn8xleX6B3XL6a9ELg5NuU=
1501+
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad/go.mod h1:9FVSpi1LvVlZ/JoNf5Z+sBCgLObzkVIHHvx9fSo5/mA=
15021502
github.com/openshift-pipelines/pipelines-as-code v0.27.0 h1:uxpva7/Ad/QEvc40BCBFEWrmYlAjCZ9dZCFYPYWW61c=
15031503
github.com/openshift-pipelines/pipelines-as-code v0.27.0/go.mod h1:rzfXtaqbUrsAock3f948p9ekXWc3DFFk9acz5BsEwA4=
15041504
github.com/openshift/source-to-image v1.4.1-0.20240605122348-f94ff357628b h1:FGmtvZdOUj8+oEmL773UwU348D1mx42KHSqFoEAXwtw=

go.work.sum

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -905,8 +905,6 @@ github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf
905905
github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8=
906906
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
907907
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI=
908-
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb/go.mod h1:AB3tJ9HfekmLRSMPgcevg5oxO6WwKVrYqchBajXZ1xc=
909-
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead/go.mod h1:9FVSpi1LvVlZ/JoNf5Z+sBCgLObzkVIHHvx9fSo5/mA=
910908
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
911909
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
912910
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M=
@@ -1328,7 +1326,6 @@ knative.dev/caching v0.0.0-20241022012359-41bbaf964d16 h1:vQ0y0mO1ALdOd/FPiw7gf1
13281326
knative.dev/caching v0.0.0-20241022012359-41bbaf964d16/go.mod h1:qOvjasSUI+GyF4hsqJmIomblcgjkLzJhng8/zk0B9J4=
13291327
knative.dev/hack/schema v0.0.0-20241010131451-05b2fb30cb4d h1:N+UlBE8F8LJUh/m6cYSwzqdqNg65BD9jbWoWO9nfqEA=
13301328
knative.dev/hack/schema v0.0.0-20241010131451-05b2fb30cb4d/go.mod h1:jRH/sx6mwwuMVhvJgnzSaoYA1N4qaIkJa+zxEGtVA5I=
1331-
knative.dev/kn-plugin-source-kafka v0.43.0/go.mod h1:Vw6jL8MckM3v5AOrHTOfkiY0RSVN/eWzXoGjZD9ArMI=
13321329
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
13331330
modernc.org/cc/v3 v3.36.3 h1:uISP3F66UlixxWEcKuIWERa4TwrZENHSL8tWxZz8bHg=
13341331
modernc.org/ccgo/v3 v3.16.9 h1:AXquSwg7GuMk11pIdw7fmO1Y/ybgazVkMhsZWCV0mHM=

vendor/knative.dev/func/generate/zz_filesystem_generated.go

Lines changed: 9689 additions & 9688 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/knative.dev/func/pkg/docker/pusher.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ func (n *Pusher) pushImage(ctx context.Context, f fn.Function, credentials Crede
201201
if err == nil {
202202
return digest, nil
203203
}
204-
if strings.Contains(err.Error(), "no such host") {
204+
errStr := err.Error()
205+
if strings.Contains(errStr, "no such host") ||
206+
strings.Contains(errStr, "failure in name resolution") ||
207+
regexp.MustCompile(`lookup .*: server misbehaving`).MatchString(errStr) {
205208
// push with custom transport to be able to push into cluster private registries
206209
return n.push(ctx, f, credentials, output)
207210
}

vendor/knative.dev/func/pkg/functions/runner.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ func runGo(ctx context.Context, job *Job) (err error) {
110110
fmt.Printf("cd %v && go build -o f.bin\n", job.Dir())
111111
}
112112

113-
// Build
114-
args := []string{"build", "-o", "f.bin"}
113+
args := []string{"mod", "tidy"}
115114
if job.verbose {
116115
args = append(args, "-v")
117116
}
@@ -124,6 +123,20 @@ func runGo(ctx context.Context, job *Job) (err error) {
124123
return
125124
}
126125

126+
// Build
127+
args = []string{"build", "-o", "f.bin"}
128+
if job.verbose {
129+
args = append(args, "-v")
130+
}
131+
cmd = exec.CommandContext(ctx, "go", args...)
132+
cmd.Dir = job.Dir()
133+
cmd.Stdout = os.Stdout
134+
cmd.Stderr = os.Stderr
135+
err = cmd.Run()
136+
if err != nil {
137+
return
138+
}
139+
127140
// Run
128141
// ---
129142
bin := filepath.Join(job.Dir(), "f.bin")

vendor/knative.dev/func/pkg/oci/go_builder.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,18 @@ func goBuild(cfg buildJob, p v1.Platform) (binPath string, err error) {
8686
fmt.Printf(" %v\n", filepath.Base(outpath))
8787
}
8888

89+
cmd := exec.CommandContext(cfg.ctx, gobin, "mod", "tidy")
90+
cmd.Env = envs
91+
cmd.Dir = cfg.buildDir()
92+
cmd.Stderr = os.Stderr
93+
cmd.Stdout = os.Stdout
94+
err = cmd.Run()
95+
if err != nil {
96+
return "", fmt.Errorf("cannot sync deps: %w", err)
97+
}
98+
8999
// Build the function
90-
cmd := exec.CommandContext(cfg.ctx, gobin, args...)
100+
cmd = exec.CommandContext(cfg.ctx, gobin, args...)
91101
cmd.Env = envs
92102
cmd.Dir = cfg.buildDir()
93103
cmd.Stderr = os.Stderr

vendor/knative.dev/func/pkg/pipelines/tekton/tasks.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@ spec:
406406
workspaces:
407407
- name: source
408408
description: The workspace containing the function project
409+
- name: cache
410+
optional: true
411+
- name: sslcertdir
412+
optional: true
413+
- name: dockerconfig
414+
optional: true
409415
steps:
410416
- name: func-deploy
411417
image: "%s"
@@ -431,6 +437,15 @@ spec:
431437
- name: path
432438
description: Path to the function project
433439
default: ""
440+
workspaces:
441+
- name: source
442+
description: The workspace containing the function project
443+
- name: cache
444+
optional: true
445+
- name: sslcertdir
446+
optional: true
447+
- name: dockerconfig
448+
optional: true
434449
steps:
435450
- name: func-scaffold
436451
image: %s

vendor/knative.dev/func/pkg/pipelines/tekton/templates_pack.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ spec:
4949
workspaces:
5050
- name: source
5151
workspace: source-workspace
52+
- name: cache
53+
workspace: cache-workspace
54+
- name: dockerconfig
55+
workspace: dockerconfig-workspace
5256
{{.RunAfterFetchSources}}
5357
{{.FuncScaffoldTaskRef}}
5458
- name: build
@@ -86,6 +90,10 @@ spec:
8690
workspaces:
8791
- name: source
8892
workspace: source-workspace
93+
- name: cache
94+
workspace: cache-workspace
95+
- name: dockerconfig
96+
workspace: dockerconfig-workspace
8997
workspaces:
9098
- description: Directory where function source is located.
9199
name: source-workspace
@@ -115,11 +123,11 @@ metadata:
115123
spec:
116124
params:
117125
- name: gitRepository
118-
value: {{.RepoUrl}}
126+
value: "{{.RepoUrl}}"
119127
- name: gitRevision
120128
value: {{.Revision}}
121129
- name: contextDir
122-
value: {{.ContextDir}}
130+
value: "{{.ContextDir}}"
123131
- name: imageName
124132
value: {{.FunctionImage}}
125133
- name: registry
@@ -182,7 +190,7 @@ spec:
182190
- name: gitRevision
183191
value: {{.Revision}}
184192
- name: contextDir
185-
value: {{.ContextDir}}
193+
value: "{{.ContextDir}}"
186194
- name: imageName
187195
value: {{.FunctionImage}}
188196
- name: registry

vendor/knative.dev/func/pkg/pipelines/tekton/templates_s2i.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ spec:
5353
workspaces:
5454
- name: source
5555
workspace: source-workspace
56+
- name: cache
57+
workspace: cache-workspace
58+
- name: dockerconfig
59+
workspace: dockerconfig-workspace
5660
{{.RunAfterFetchSources}}
5761
{{.FuncScaffoldTaskRef}}
5862
- name: build
@@ -92,6 +96,10 @@ spec:
9296
workspaces:
9397
- name: source
9498
workspace: source-workspace
99+
- name: cache
100+
workspace: cache-workspace
101+
- name: dockerconfig
102+
workspace: dockerconfig-workspace
95103
workspaces:
96104
- description: Directory where function source is located.
97105
name: source-workspace
@@ -120,11 +128,11 @@ metadata:
120128
spec:
121129
params:
122130
- name: gitRepository
123-
value: {{.RepoUrl}}
131+
value: "{{.RepoUrl}}"
124132
- name: gitRevision
125133
value: {{.Revision}}
126134
- name: contextDir
127-
value: {{.ContextDir}}
135+
value: "{{.ContextDir}}"
128136
- name: imageName
129137
value: {{.FunctionImage}}
130138
- name: registry
@@ -192,7 +200,7 @@ spec:
192200
- name: gitRevision
193201
value: {{.Revision}}
194202
- name: contextDir
195-
value: {{.ContextDir}}
203+
value: "{{.ContextDir}}"
196204
- name: imageName
197205
value: {{.FunctionImage}}
198206
- name: registry

0 commit comments

Comments
 (0)