Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,6 @@ require (
replace (
k8s.io/client-go => k8s.io/client-go v0.30.10

knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1497,8 +1497,8 @@ github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaL
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb h1:pnk1Mw27NO/gntKymU4DDaRRbrGMY1a9Wu8hI2d/CK8=
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb/go.mod h1:AB3tJ9HfekmLRSMPgcevg5oxO6WwKVrYqchBajXZ1xc=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead h1:HTJH0FL6h/b6oJYVIOhw23c2w5tzKzun8qq3fl4EobM=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead/go.mod h1:9FVSpi1LvVlZ/JoNf5Z+sBCgLObzkVIHHvx9fSo5/mA=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad h1:R727qHXX54tR4ALaJfEMRxn8xleX6B3XL6a9ELg5NuU=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad/go.mod h1:9FVSpi1LvVlZ/JoNf5Z+sBCgLObzkVIHHvx9fSo5/mA=
github.com/openshift-pipelines/pipelines-as-code v0.27.0 h1:uxpva7/Ad/QEvc40BCBFEWrmYlAjCZ9dZCFYPYWW61c=
github.com/openshift-pipelines/pipelines-as-code v0.27.0/go.mod h1:rzfXtaqbUrsAock3f948p9ekXWc3DFFk9acz5BsEwA4=
github.com/openshift/source-to-image v1.4.1-0.20240605122348-f94ff357628b h1:FGmtvZdOUj8+oEmL773UwU348D1mx42KHSqFoEAXwtw=
Expand Down
3 changes: 0 additions & 3 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,6 @@ github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf
github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8=
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI=
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb/go.mod h1:AB3tJ9HfekmLRSMPgcevg5oxO6WwKVrYqchBajXZ1xc=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead/go.mod h1:9FVSpi1LvVlZ/JoNf5Z+sBCgLObzkVIHHvx9fSo5/mA=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M=
Expand Down Expand Up @@ -1328,7 +1326,6 @@ knative.dev/caching v0.0.0-20241022012359-41bbaf964d16 h1:vQ0y0mO1ALdOd/FPiw7gf1
knative.dev/caching v0.0.0-20241022012359-41bbaf964d16/go.mod h1:qOvjasSUI+GyF4hsqJmIomblcgjkLzJhng8/zk0B9J4=
knative.dev/hack/schema v0.0.0-20241010131451-05b2fb30cb4d h1:N+UlBE8F8LJUh/m6cYSwzqdqNg65BD9jbWoWO9nfqEA=
knative.dev/hack/schema v0.0.0-20241010131451-05b2fb30cb4d/go.mod h1:jRH/sx6mwwuMVhvJgnzSaoYA1N4qaIkJa+zxEGtVA5I=
knative.dev/kn-plugin-source-kafka v0.43.0/go.mod h1:Vw6jL8MckM3v5AOrHTOfkiY0RSVN/eWzXoGjZD9ArMI=
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
modernc.org/cc/v3 v3.36.3 h1:uISP3F66UlixxWEcKuIWERa4TwrZENHSL8tWxZz8bHg=
modernc.org/ccgo/v3 v3.16.9 h1:AXquSwg7GuMk11pIdw7fmO1Y/ybgazVkMhsZWCV0mHM=
Expand Down
19,377 changes: 9,689 additions & 9,688 deletions vendor/knative.dev/func/generate/zz_filesystem_generated.go

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion vendor/knative.dev/func/pkg/docker/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ func (n *Pusher) pushImage(ctx context.Context, f fn.Function, credentials Crede
if err == nil {
return digest, nil
}
if strings.Contains(err.Error(), "no such host") {
errStr := err.Error()
if strings.Contains(errStr, "no such host") ||
strings.Contains(errStr, "failure in name resolution") ||
regexp.MustCompile(`lookup .*: server misbehaving`).MatchString(errStr) {
// push with custom transport to be able to push into cluster private registries
return n.push(ctx, f, credentials, output)
}
Expand Down
17 changes: 15 additions & 2 deletions vendor/knative.dev/func/pkg/functions/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ func runGo(ctx context.Context, job *Job) (err error) {
fmt.Printf("cd %v && go build -o f.bin\n", job.Dir())
}

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

// Build
args = []string{"build", "-o", "f.bin"}
if job.verbose {
args = append(args, "-v")
}
cmd = exec.CommandContext(ctx, "go", args...)
cmd.Dir = job.Dir()
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err = cmd.Run()
if err != nil {
return
}

// Run
// ---
bin := filepath.Join(job.Dir(), "f.bin")
Expand Down
12 changes: 11 additions & 1 deletion vendor/knative.dev/func/pkg/oci/go_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,18 @@ func goBuild(cfg buildJob, p v1.Platform) (binPath string, err error) {
fmt.Printf(" %v\n", filepath.Base(outpath))
}

cmd := exec.CommandContext(cfg.ctx, gobin, "mod", "tidy")
cmd.Env = envs
cmd.Dir = cfg.buildDir()
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
err = cmd.Run()
if err != nil {
return "", fmt.Errorf("cannot sync deps: %w", err)
}

// Build the function
cmd := exec.CommandContext(cfg.ctx, gobin, args...)
cmd = exec.CommandContext(cfg.ctx, gobin, args...)
cmd.Env = envs
cmd.Dir = cfg.buildDir()
cmd.Stderr = os.Stderr
Expand Down
15 changes: 15 additions & 0 deletions vendor/knative.dev/func/pkg/pipelines/tekton/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,12 @@ spec:
workspaces:
- name: source
description: The workspace containing the function project
- name: cache
optional: true
- name: sslcertdir
optional: true
- name: dockerconfig
optional: true
steps:
- name: func-deploy
image: "%s"
Expand All @@ -431,6 +437,15 @@ spec:
- name: path
description: Path to the function project
default: ""
workspaces:
- name: source
description: The workspace containing the function project
- name: cache
optional: true
- name: sslcertdir
optional: true
- name: dockerconfig
optional: true
steps:
- name: func-scaffold
image: %s
Expand Down
14 changes: 11 additions & 3 deletions vendor/knative.dev/func/pkg/pipelines/tekton/templates_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
{{.RunAfterFetchSources}}
{{.FuncScaffoldTaskRef}}
- name: build
Expand Down Expand Up @@ -86,6 +90,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
workspaces:
- description: Directory where function source is located.
name: source-workspace
Expand Down Expand Up @@ -115,11 +123,11 @@ metadata:
spec:
params:
- name: gitRepository
value: {{.RepoUrl}}
value: "{{.RepoUrl}}"
- name: gitRevision
value: {{.Revision}}
- name: contextDir
value: {{.ContextDir}}
value: "{{.ContextDir}}"
- name: imageName
value: {{.FunctionImage}}
- name: registry
Expand Down Expand Up @@ -182,7 +190,7 @@ spec:
- name: gitRevision
value: {{.Revision}}
- name: contextDir
value: {{.ContextDir}}
value: "{{.ContextDir}}"
- name: imageName
value: {{.FunctionImage}}
- name: registry
Expand Down
14 changes: 11 additions & 3 deletions vendor/knative.dev/func/pkg/pipelines/tekton/templates_s2i.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
{{.RunAfterFetchSources}}
{{.FuncScaffoldTaskRef}}
- name: build
Expand Down Expand Up @@ -92,6 +96,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
workspaces:
- description: Directory where function source is located.
name: source-workspace
Expand Down Expand Up @@ -120,11 +128,11 @@ metadata:
spec:
params:
- name: gitRepository
value: {{.RepoUrl}}
value: "{{.RepoUrl}}"
- name: gitRevision
value: {{.Revision}}
- name: contextDir
value: {{.ContextDir}}
value: "{{.ContextDir}}"
- name: imageName
value: {{.FunctionImage}}
- name: registry
Expand Down Expand Up @@ -192,7 +200,7 @@ spec:
- name: gitRevision
value: {{.Revision}}
- name: contextDir
value: {{.ContextDir}}
value: "{{.ContextDir}}"
- name: imageName
value: {{.FunctionImage}}
- name: registry
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ knative.dev/eventing-kafka-broker/control-plane/pkg/apis/sources/v1beta1
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/scheme
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/typed/sources/v1beta1
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/typed/sources/v1beta1/fake
# knative.dev/func v0.43.2 => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead
# knative.dev/func v0.43.2 => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad
## explicit; go 1.23.0
knative.dev/func/cmd
knative.dev/func/cmd/prompt
Expand Down Expand Up @@ -2433,5 +2433,5 @@ sigs.k8s.io/structured-merge-diff/v4/value
sigs.k8s.io/yaml
sigs.k8s.io/yaml/goyaml.v2
# k8s.io/client-go => k8s.io/client-go v0.30.10
# knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250512110814-d92b9abc8ead
# knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20250820114648-23f4490237ad
# knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250505073738-1d80299d87eb