Skip to content

Commit 7581961

Browse files
authored
[release-v1.17] Update func to latest version (#873)
/cc @Kaustubh-pande @rudyredhat1
1 parent c22918f commit 7581961

File tree

183 files changed

+34388
-26188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+34388
-26188
lines changed

go.mod

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
cloud.google.com/go/compute/metadata v0.5.2 // indirect
2323
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
2424
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
25-
dario.cat/mergo v1.0.1 // indirect
25+
dario.cat/mergo v1.0.0 // indirect
2626
emperror.dev/errors v0.8.1 // indirect
2727
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
2828
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
@@ -125,11 +125,12 @@ require (
125125
github.com/google/btree v1.1.3 // indirect
126126
github.com/google/cel-go v0.21.0 // indirect
127127
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
128-
github.com/google/go-cmp v0.6.0 // indirect
128+
github.com/google/go-cmp v0.7.0 // indirect
129129
github.com/google/go-containerregistry v0.20.2 // indirect
130130
github.com/google/go-github/v49 v49.1.0 // indirect
131131
github.com/google/go-querystring v1.1.0 // indirect
132132
github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect
133+
github.com/google/jsonschema-go v0.3.0 // indirect
133134
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
134135
github.com/google/uuid v1.6.0 // indirect
135136
github.com/gorilla/mux v1.8.1 // indirect
@@ -161,7 +162,6 @@ require (
161162
github.com/mailru/easyjson v0.7.7 // indirect
162163
github.com/manifestival/client-go-client v0.5.0 // indirect
163164
github.com/manifestival/manifestival v0.7.2 // indirect
164-
github.com/mark3labs/mcp-go v0.30.0 // indirect
165165
github.com/mattn/go-colorable v0.1.13 // indirect
166166
github.com/mattn/go-isatty v0.0.20 // indirect
167167
github.com/mattn/go-runewidth v0.0.16 // indirect
@@ -179,6 +179,7 @@ require (
179179
github.com/moby/sys/user v0.3.0 // indirect
180180
github.com/moby/sys/userns v0.1.0 // indirect
181181
github.com/moby/term v0.5.0 // indirect
182+
github.com/modelcontextprotocol/go-sdk v1.1.0 // indirect
182183
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
183184
github.com/modern-go/reflect2 v1.0.2 // indirect
184185
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
@@ -187,7 +188,7 @@ require (
187188
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
188189
github.com/onsi/ginkgo/v2 v2.22.1 // indirect
189190
github.com/opencontainers/go-digest v1.0.0 // indirect
190-
github.com/opencontainers/image-spec v1.1.0 // indirect
191+
github.com/opencontainers/image-spec v1.1.1 // indirect
191192
github.com/opencontainers/runtime-spec v1.2.0 // indirect
192193
github.com/opencontainers/selinux v1.11.0 // indirect
193194
github.com/openshift-pipelines/pipelines-as-code v0.31.0 // indirect
@@ -251,17 +252,17 @@ require (
251252
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
252253
go.uber.org/multierr v1.11.0 // indirect
253254
go.uber.org/zap v1.27.0 // indirect
254-
golang.org/x/crypto v0.37.0 // indirect
255+
golang.org/x/crypto v0.39.0 // indirect
255256
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect
256-
golang.org/x/mod v0.23.0 // indirect
257-
golang.org/x/net v0.39.0 // indirect
258-
golang.org/x/oauth2 v0.25.0 // indirect
259-
golang.org/x/sync v0.13.0 // indirect
260-
golang.org/x/sys v0.32.0 // indirect
261-
golang.org/x/term v0.31.0 // indirect
262-
golang.org/x/text v0.24.0 // indirect
257+
golang.org/x/mod v0.25.0 // indirect
258+
golang.org/x/net v0.41.0 // indirect
259+
golang.org/x/oauth2 v0.30.0 // indirect
260+
golang.org/x/sync v0.15.0 // indirect
261+
golang.org/x/sys v0.33.0 // indirect
262+
golang.org/x/term v0.32.0 // indirect
263+
golang.org/x/text v0.26.0 // indirect
263264
golang.org/x/time v0.7.0 // indirect
264-
golang.org/x/tools v0.30.0 // indirect
265+
golang.org/x/tools v0.34.0 // indirect
265266
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
266267
google.golang.org/api v0.204.0 // indirect
267268
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect
@@ -301,6 +302,6 @@ replace (
301302
github.com/imdario/mergo => dario.cat/mergo v1.0.1
302303
k8s.io/client-go => k8s.io/client-go v0.31.4
303304

304-
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788
305+
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251106233508-e3f900d358a0
305306
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250909142807-417eafe6248c
306307
)

go.sum

Lines changed: 99 additions & 20 deletions
Large diffs are not rendered by default.

go.work.sum

Lines changed: 3 additions & 67 deletions
Large diffs are not rendered by default.

openshift/ci-operator/knative-images/cli-artifacts/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ WORKDIR /workspace
88
# Allow copying from higher directory when context is limited
99
COPY . .
1010
ENV TAG="v1.17.0"
11-
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:3271e1f6001354fa01382f1fb1ba8cb5a3a6335ccc932c243678747689c4ce04
12-
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel9@sha256:e03e39f6a44c0e6a5e48a42b67dc2f25916bc03521aafa10726b153d36f0c398
11+
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:2a77b1aeaad020116a4031423331addac4d9684ce172bb4dbea52018f1fa31b5
12+
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel9@sha256:c99db1c35fe8176c0b2dae5a6114c8d891f2e5626546bdd50b28763b0aae73b0
1313
# Build binaries
1414
# RUN make build-cross-package
1515
RUN ./hack/build.sh -p linux amd64

openshift/ci-operator/knative-images/kn/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ COPY . .
1010
ENV CGO_ENABLED=1
1111
ENV GOEXPERIMENT=strictfipsruntime
1212

13-
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:3271e1f6001354fa01382f1fb1ba8cb5a3a6335ccc932c243678747689c4ce04
14-
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel9@sha256:e03e39f6a44c0e6a5e48a42b67dc2f25916bc03521aafa10726b153d36f0c398
13+
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:2a77b1aeaad020116a4031423331addac4d9684ce172bb4dbea52018f1fa31b5
14+
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel9@sha256:c99db1c35fe8176c0b2dae5a6114c8d891f2e5626546bdd50b28763b0aae73b0
1515
RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/kn
1616

1717
FROM $GO_RUNTIME

vendor/dario.cat/mergo/.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
# Output of the go coverage tool, specifically when used with LiteIDE
1414
*.out
1515

16-
# Golang/Intellij
17-
.idea
18-
1916
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
2017
.glide/
2118

vendor/dario.cat/mergo/README.md

Lines changed: 46 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,13 @@ Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the
4444

4545
## Status
4646

47-
Mergo is stable and frozen, ready for production. Check a short list of the projects using at large scale it [here](https://github.com/imdario/mergo#mergo-in-the-wild).
48-
49-
No new features are accepted. They will be considered for a future v2 that improves the implementation and fixes bugs for corner cases.
47+
It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, Microsoft, etc](https://github.com/imdario/mergo#mergo-in-the-wild).
5048

5149
### Important notes
5250

5351
#### 1.0.0
5452

55-
In [1.0.0](//github.com/imdario/mergo/releases/tag/1.0.0) Mergo moves to a vanity URL `dario.cat/mergo`. No more v1 versions will be released.
56-
57-
If the vanity URL is causing issues in your project due to a dependency pulling Mergo - it isn't a direct dependency in your project - it is recommended to use [replace](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) to pin the version to the last one with the old import URL:
58-
59-
```
60-
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16
61-
```
53+
In [1.0.0](//github.com/imdario/mergo/releases/tag/1.0.0) Mergo moves to a vanity URL `dario.cat/mergo`.
6254

6355
#### 0.3.9
6456

@@ -72,24 +64,55 @@ If you were using Mergo before April 6th, 2015, please check your project works
7264

7365
If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes:
7466

67+
<a href='https://ko-fi.com/B0B58839' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
7568
<a href="https://liberapay.com/dario/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
7669
<a href='https://github.com/sponsors/imdario' target='_blank'><img alt="Become my sponsor" src="https://img.shields.io/github/sponsors/imdario?style=for-the-badge" /></a>
7770

7871
### Mergo in the wild
7972

80-
Mergo is used by [thousands](https://deps.dev/go/dario.cat%2Fmergo/v1.0.0/dependents) [of](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.16/dependents) [projects](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.12), including:
81-
82-
* [containerd/containerd](https://github.com/containerd/containerd)
83-
* [datadog/datadog-agent](https://github.com/datadog/datadog-agent)
84-
* [docker/cli/](https://github.com/docker/cli/)
85-
* [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser)
86-
* [go-micro/go-micro](https://github.com/go-micro/go-micro)
87-
* [grafana/loki](https://github.com/grafana/loki)
88-
* [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
89-
* [masterminds/sprig](github.com/Masterminds/sprig)
90-
* [moby/moby](https://github.com/moby/moby)
91-
* [slackhq/nebula](https://github.com/slackhq/nebula)
92-
* [volcano-sh/volcano](https://github.com/volcano-sh/volcano)
73+
- [moby/moby](https://github.com/moby/moby)
74+
- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
75+
- [vmware/dispatch](https://github.com/vmware/dispatch)
76+
- [Shopify/themekit](https://github.com/Shopify/themekit)
77+
- [imdario/zas](https://github.com/imdario/zas)
78+
- [matcornic/hermes](https://github.com/matcornic/hermes)
79+
- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go)
80+
- [kataras/iris](https://github.com/kataras/iris)
81+
- [michaelsauter/crane](https://github.com/michaelsauter/crane)
82+
- [go-task/task](https://github.com/go-task/task)
83+
- [sensu/uchiwa](https://github.com/sensu/uchiwa)
84+
- [ory/hydra](https://github.com/ory/hydra)
85+
- [sisatech/vcli](https://github.com/sisatech/vcli)
86+
- [dairycart/dairycart](https://github.com/dairycart/dairycart)
87+
- [projectcalico/felix](https://github.com/projectcalico/felix)
88+
- [resin-os/balena](https://github.com/resin-os/balena)
89+
- [go-kivik/kivik](https://github.com/go-kivik/kivik)
90+
- [Telefonica/govice](https://github.com/Telefonica/govice)
91+
- [supergiant/supergiant](supergiant/supergiant)
92+
- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce)
93+
- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy)
94+
- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel)
95+
- [EagerIO/Stout](https://github.com/EagerIO/Stout)
96+
- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api)
97+
- [russross/canvasassignments](https://github.com/russross/canvasassignments)
98+
- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api)
99+
- [casualjim/exeggutor](https://github.com/casualjim/exeggutor)
100+
- [divshot/gitling](https://github.com/divshot/gitling)
101+
- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl)
102+
- [andrerocker/deploy42](https://github.com/andrerocker/deploy42)
103+
- [elwinar/rambler](https://github.com/elwinar/rambler)
104+
- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman)
105+
- [jfbus/impressionist](https://github.com/jfbus/impressionist)
106+
- [Jmeyering/zealot](https://github.com/Jmeyering/zealot)
107+
- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host)
108+
- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go)
109+
- [thoas/picfit](https://github.com/thoas/picfit)
110+
- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server)
111+
- [jnuthong/item_search](https://github.com/jnuthong/item_search)
112+
- [bukalapak/snowboard](https://github.com/bukalapak/snowboard)
113+
- [containerssh/containerssh](https://github.com/containerssh/containerssh)
114+
- [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser)
115+
- [tjpnz/structbot](https://github.com/tjpnz/structbot)
93116

94117
## Install
95118

@@ -118,39 +141,6 @@ if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {
118141
}
119142
```
120143

121-
If you need to override pointers, so the source pointer's value is assigned to the destination's pointer, you must use `WithoutDereference`:
122-
123-
```go
124-
package main
125-
126-
import (
127-
"fmt"
128-
129-
"dario.cat/mergo"
130-
)
131-
132-
type Foo struct {
133-
A *string
134-
B int64
135-
}
136-
137-
func main() {
138-
first := "first"
139-
second := "second"
140-
src := Foo{
141-
A: &first,
142-
B: 2,
143-
}
144-
145-
dest := Foo{
146-
A: &second,
147-
B: 1,
148-
}
149-
150-
mergo.Merge(&dest, src, mergo.WithOverride, mergo.WithoutDereference)
151-
}
152-
```
153-
154144
Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field.
155145

156146
```go

vendor/dario.cat/mergo/map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, conf
5858
}
5959
fieldName := field.Name
6060
fieldName = changeInitialCase(fieldName, unicode.ToLower)
61-
if _, ok := dstMap[fieldName]; !ok || (!isEmptyValue(reflect.ValueOf(src.Field(i).Interface()), !config.ShouldNotDereference) && overwrite) || config.overwriteWithEmptyValue {
61+
if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v), !config.ShouldNotDereference) || overwrite) {
6262
dstMap[fieldName] = src.Field(i).Interface()
6363
}
6464
}

vendor/dario.cat/mergo/merge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
269269
if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
270270
return
271271
}
272-
} else if src.Elem().Kind() != reflect.Struct {
272+
} else {
273273
if overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() {
274274
dst.Set(src)
275275
}

vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go

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

0 commit comments

Comments
 (0)