diff --git a/.golangci.yml b/.golangci.yml index aaae3c37e..25dc9e996 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -235,6 +235,13 @@ linters: - revive text: "var-naming: avoid meaningless package names" path: apis/common + + # The errors package intentionally shadows the stdlib errors package + # to provide a drop-in compatible API with additional functionality. + - linters: + - revive + text: "var-naming: avoid package names that conflict with Go standard library package names" + path: pkg/errors/ paths: - zz_generated\..+\.go$ - .+\.pb.go$ diff --git a/Earthfile b/Earthfile index dfa0b7ccb..269da168d 100644 --- a/Earthfile +++ b/Earthfile @@ -3,7 +3,7 @@ VERSION --try --raw-output 0.8 PROJECT crossplane/crossplane-runtime -ARG --global GO_VERSION=1.24.4 +ARG --global GO_VERSION=1.25.0 # reviewable checks that a branch is ready for review. Run it before opening a # pull request. It will catch a lot of the things our CI workflow will catch. @@ -102,7 +102,7 @@ go-test: # go-lint lints Go code. go-lint: - ARG GOLANGCI_LINT_VERSION=v2.2.1 + ARG GOLANGCI_LINT_VERSION=v2.8.0 FROM +go-modules # This cache is private because golangci-lint doesn't support concurrent runs. CACHE --id go-lint --sharing private /root/.cache/golangci-lint diff --git a/go.mod b/go.mod index 4000c6271..21d073e34 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/crossplane/crossplane-runtime/v2 -go 1.24.0 +go 1.25.0 require ( dario.cat/mergo v1.0.2 @@ -9,79 +9,97 @@ require ( github.com/google/go-cmp v0.7.0 github.com/prometheus/client_golang v1.23.2 github.com/spf13/afero v1.15.0 - golang.org/x/time v0.9.0 - google.golang.org/grpc v1.72.1 + golang.org/x/time v0.14.0 + google.golang.org/grpc v1.78.0 google.golang.org/protobuf v1.36.11 - k8s.io/api v0.34.0 - k8s.io/apiextensions-apiserver v0.34.0 - k8s.io/apimachinery v0.34.0 - k8s.io/client-go v0.34.0 - k8s.io/component-base v0.34.0 + k8s.io/api v0.35.0 + k8s.io/apiextensions-apiserver v0.35.0 + k8s.io/apimachinery v0.35.0 + k8s.io/client-go v0.35.0 + k8s.io/component-base v0.35.0 k8s.io/klog/v2 v2.130.1 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 - sigs.k8s.io/controller-runtime v0.22.0 - sigs.k8s.io/controller-tools v0.18.0 + k8s.io/utils v0.0.0-20260108192941-914a6e750570 + sigs.k8s.io/controller-runtime v0.23.1 + sigs.k8s.io/controller-tools v0.20.0 sigs.k8s.io/yaml v1.6.0 ) require ( + cel.dev/expr v0.25.1 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/fatih/color v1.18.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/swag v0.25.4 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/jsonutils v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect github.com/gobuffalo/flect v1.0.3 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/gnostic-models v0.7.0 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/google/gnostic-models v0.7.1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.66.1 // indirect - github.com/prometheus/procfs v0.16.1 // indirect - github.com/spf13/cobra v1.9.1 // indirect - github.com/spf13/pflag v1.0.6 // indirect + github.com/prometheus/common v0.67.5 // indirect + github.com/prometheus/procfs v0.19.2 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect github.com/x448/float16 v0.8.4 // indirect - go.opentelemetry.io/otel v1.35.0 // indirect - go.opentelemetry.io/otel/trace v1.35.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect + go.opentelemetry.io/otel v1.40.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.40.0 // indirect + go.uber.org/zap v1.27.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/mod v0.26.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.34.0 // indirect - golang.org/x/text v0.28.0 // indirect - golang.org/x/tools v0.35.0 // indirect - golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/mod v0.32.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/term v0.39.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/tools v0.41.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/code-generator v0.34.0 // indirect - k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + k8s.io/code-generator v0.35.0 // indirect + k8s.io/gengo/v2 v2.0.0-20251215205346-5ee0d033ba5b // indirect + k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect ) diff --git a/go.sum b/go.sum index cd9b63e4e..3e7d0bc4f 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,34 @@ +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= -github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8= github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= @@ -30,59 +39,77 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= +github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= -github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c= +github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4 h1:kEISI/Gx67NzH3nJxAmY/dGac80kKZgZt134u7Y/k1s= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4/go.mod h1:6Nz966r3vQYCqIzWsuEl9d7cf7mRhtDmm++sOxlnfxI= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -97,31 +124,32 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= -github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= -github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= -github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.3 h1:eTX+W6dobAYfFeGC2PV6RwXRu/MyT+cQguijutvkpSM= +github.com/onsi/gomega v1.38.3/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= -github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -135,92 +163,78 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= +go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= +go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 h1:f0cb2XPmrqn4XMy9PNliTgRKJgS5WcL/u0/WRYGz4t0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0/go.mod h1:vnakAaFckOMiMtOIhFI2MNH4FYrZzXCYxmb1LlhoGz8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 h1:in9O8ESIOlwJAEGTkkf34DesGRAc/Pn8qJ7k3r/42LM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0/go.mod h1:Rp0EXBm5tfnv0WL+ARyO/PHBEaEAT8UUHQ6AGJcSq6c= +go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= +go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= +go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= -golang.org/x/tools/go/expect v0.1.0-deprecated h1:jY2C5HGYR5lqex3gEniOQL0r7Dq5+VGVgY1nudX5lXY= -golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= -gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= +gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 h1:Jr5R2J6F6qWyzINc+4AM8t5pfUz6beZpHp678GNrMbE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -230,35 +244,39 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE= -k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug= -k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc= -k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0= -k8s.io/apimachinery v0.34.0 h1:eR1WO5fo0HyoQZt1wdISpFDffnWOvFLOOeJ7MgIv4z0= -k8s.io/apimachinery v0.34.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= -k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo= -k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY= -k8s.io/code-generator v0.34.0 h1:Ze2i1QsvUprIlX3oHiGv09BFQRLCz+StA8qKwwFzees= -k8s.io/code-generator v0.34.0/go.mod h1:Py2+4w2HXItL8CGhks8uI/wS3Y93wPKO/9mBQUYNua0= -k8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8= -k8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.35.0 h1:iBAU5LTyBI9vw3L5glmat1njFK34srdLmktWwLTprlY= +k8s.io/api v0.35.0/go.mod h1:AQ0SNTzm4ZAczM03QH42c7l3bih1TbAXYo0DkF8ktnA= +k8s.io/apiextensions-apiserver v0.35.0 h1:3xHk2rTOdWXXJM+RDQZJvdx0yEOgC0FgQ1PlJatA5T4= +k8s.io/apiextensions-apiserver v0.35.0/go.mod h1:E1Ahk9SADaLQ4qtzYFkwUqusXTcaV2uw3l14aqpL2LU= +k8s.io/apimachinery v0.35.0 h1:Z2L3IHvPVv/MJ7xRxHEtk6GoJElaAqDCCU0S6ncYok8= +k8s.io/apimachinery v0.35.0/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/apiserver v0.35.0 h1:CUGo5o+7hW9GcAEF3x3usT3fX4f9r8xmgQeCBDaOgX4= +k8s.io/apiserver v0.35.0/go.mod h1:QUy1U4+PrzbJaM3XGu2tQ7U9A4udRRo5cyxkFX0GEds= +k8s.io/client-go v0.35.0 h1:IAW0ifFbfQQwQmga0UdoH0yvdqrbwMdq9vIFEhRpxBE= +k8s.io/client-go v0.35.0/go.mod h1:q2E5AAyqcbeLGPdoRB+Nxe3KYTfPce1Dnu1myQdqz9o= +k8s.io/code-generator v0.35.0 h1:TvrtfKYZTm9oDF2z+veFKSCcgZE3Igv0svY+ehCmjHQ= +k8s.io/code-generator v0.35.0/go.mod h1:iS1gvVf3c/T71N5DOGYO+Gt3PdJ6B9LYSvIyQ4FHzgc= +k8s.io/component-base v0.35.0 h1:+yBrOhzri2S1BVqyVSvcM3PtPyx5GUxCK2tinZz1G94= +k8s.io/component-base v0.35.0/go.mod h1:85SCX4UCa6SCFt6p3IKAPej7jSnF3L8EbfSyMZayJR0= +k8s.io/gengo/v2 v2.0.0-20251215205346-5ee0d033ba5b h1:0YkdvW3rX2vaBWsqCGZAekxPRwaI5NuYNprOsMNVLns= +k8s.io/gengo/v2 v2.0.0-20251215205346-5ee0d033ba5b/go.mod h1:yvyl3l9E+UxlqOMUULdKTAYB0rEhsmjr7+2Vb/1pCSo= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.22.0 h1:mTOfibb8Hxwpx3xEkR56i7xSjB+nH4hZG37SrlCY5e0= -sigs.k8s.io/controller-runtime v0.22.0/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY= -sigs.k8s.io/controller-tools v0.18.0 h1:rGxGZCZTV2wJreeRgqVoWab/mfcumTMmSwKzoM9xrsE= -sigs.k8s.io/controller-tools v0.18.0/go.mod h1:gLKoiGBriyNh+x1rWtUQnakUYEujErjXs9pf+x/8n1U= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 h1:HhDfevmPS+OalTjQRKbTHppRIz01AWi8s45TMXStgYY= +k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/utils v0.0.0-20260108192941-914a6e750570 h1:JT4W8lsdrGENg9W+YwwdLJxklIuKWdRm+BC+xt33FOY= +k8s.io/utils v0.0.0-20260108192941-914a6e750570/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 h1:hSfpvjjTQXQY2Fol2CS0QHMNs/WI1MOSGzCm1KhM5ec= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/controller-runtime v0.23.1 h1:TjJSM80Nf43Mg21+RCy3J70aj/W6KyvDtOlpKf+PupE= +sigs.k8s.io/controller-runtime v0.23.1/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0= +sigs.k8s.io/controller-tools v0.20.0 h1:VWZF71pwSQ2lZZCt7hFGJsOfDc5dVG28/IysjjMWXL8= +sigs.k8s.io/controller-tools v0.20.0/go.mod h1:b4qPmjGU3iZwqn34alUU5tILhNa9+VXK+J3QV0fT/uU= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 h1:2WOzJpHUBVrrkDjU4KBT8n5LDcj824eX0I5UKcgeRUs= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/gomod2nix.toml b/gomod2nix.toml index ab13ab0a0..446a7d835 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -1,9 +1,15 @@ schema = 3 [mod] + [mod."cel.dev/expr"] + version = "v0.25.1" + hash = "sha256-TEdMxFUPK7IZuCXMufwCkbN+ZZIXSQclljIybFZcByo=" [mod."dario.cat/mergo"] version = "v1.0.2" hash = "sha256-p6jdiHlLEfZES8vJnDywG4aVzIe16p0CU6iglglIweA=" + [mod."github.com/antlr4-go/antlr/v4"] + version = "v4.13.1" + hash = "sha256-beAuxHNRUuhzcSJUh/8ztVf1zCUiaT72fg2Jvx0AuNQ=" [mod."github.com/beorn7/perks"] version = "v1.0.1" hash = "sha256-h75GUqfwJKngCJQVE5Ao5wnO3cfKD9lSIteoLp/3xJ4=" @@ -17,8 +23,8 @@ schema = 3 version = "v1.1.2-0.20180830191138-d8f796af33cc" hash = "sha256-fV9oI51xjHdOmEx6+dlq7Ku2Ag+m/bmbzPo6A4Y74qc=" [mod."github.com/emicklei/go-restful/v3"] - version = "v3.12.2" - hash = "sha256-eQ0qtVH7c5jgqB7F9B17GhZujYelBA2g9KwpPuSS0sE=" + version = "v3.13.0" + hash = "sha256-lB2Z29RDLiVQE5NrsV1s2iHeQ4ciGwNj5OG1zJxwZV8=" [mod."github.com/evanphx/json-patch"] version = "v5.9.11+incompatible" hash = "sha256-1iyZpBaeBLmNkJ3T4A9fAEXEYB9nk9V02ug4pwl5dy0=" @@ -38,47 +44,77 @@ schema = 3 version = "v1.4.3" hash = "sha256-Nnp/dEVNMxLp3RSPDHZzGbI8BkSNuZMX0I0cjWKXXLA=" [mod."github.com/go-openapi/jsonpointer"] - version = "v0.21.0" - hash = "sha256-bB8XTzo4hzXemi8Ey3tIXia3mfn38bvwIzKYLJYC650=" + version = "v0.22.4" + hash = "sha256-V76k+oQUyqkWcpa64bOirteoCfdn1Xm9TLH0/7W4Uxc=" [mod."github.com/go-openapi/jsonreference"] - version = "v0.20.2" - hash = "sha256-klWZKK7LZqSg3HMIrSkjh/NwaZTr+8kTW2ok2+JlioE=" + version = "v0.21.4" + hash = "sha256-R+Q/MOSRTMiOaZutRmjv/qwbU9/cUWN59Hwr2LgDz2U=" [mod."github.com/go-openapi/swag"] - version = "v0.23.0" - hash = "sha256-D5CzsSQ3SYJLwXT6BDahnG66LI8du59Dy1mY4KutA7A=" + version = "v0.25.4" + hash = "sha256-aFQeLf95JC5gWLwIJXxhZHK9RxiGhh9IYV0MEYldDr4=" + [mod."github.com/go-openapi/swag/cmdutils"] + version = "v0.25.4" + hash = "sha256-nhlq5w/ULjwy7nptKcRryjZPlv3QG0FmgcBSOclqRlA=" + [mod."github.com/go-openapi/swag/conv"] + version = "v0.25.4" + hash = "sha256-uHgTdZC76LMSsq+x+RyeclnOgBsS0ID2cLgfjzFk0KQ=" + [mod."github.com/go-openapi/swag/fileutils"] + version = "v0.25.4" + hash = "sha256-NWacswHRvNZ81WzazA8yUmeDymtne2l8zLdArBmeYAU=" + [mod."github.com/go-openapi/swag/jsonname"] + version = "v0.25.4" + hash = "sha256-Z6uETeudh8W+/SGxFBnOB/VlJeRPRkFgCyJmntpz7bc=" + [mod."github.com/go-openapi/swag/jsonutils"] + version = "v0.25.4" + hash = "sha256-TQGeMImUuL5BWDoBHKAjZ1BvvxPXkFrV3TMgb82IrLk=" + [mod."github.com/go-openapi/swag/loading"] + version = "v0.25.4" + hash = "sha256-xr8OnFqB/kwBj3yf9HiLJwDcpL7I3/qJYlKb6VWbVFA=" + [mod."github.com/go-openapi/swag/mangling"] + version = "v0.25.4" + hash = "sha256-NrmwNgRJIUlOaAGt+XutHWSHy9e1COMnVE8B0UY5+sQ=" + [mod."github.com/go-openapi/swag/netutils"] + version = "v0.25.4" + hash = "sha256-wRMCQX/wIOvWm1g2UURobhzI47OldVqzlYYzwotLNTU=" + [mod."github.com/go-openapi/swag/stringutils"] + version = "v0.25.4" + hash = "sha256-rVo5NBH+oLLX9kaemUYWILd+TKw/TDTB8UdSz+mn3m8=" + [mod."github.com/go-openapi/swag/typeutils"] + version = "v0.25.4" + hash = "sha256-59RHnK6ugsAUc+A8DZCj7gZ3bJnt01Al7T/1kzM9PpA=" + [mod."github.com/go-openapi/swag/yamlutils"] + version = "v0.25.4" + hash = "sha256-zba7QX7Ds05oZq1opP/vwRSBEDaJ1pKm+9DgrsOuR9w=" [mod."github.com/gobuffalo/flect"] version = "v1.0.3" hash = "sha256-gpA1fe9XTjZ9r+yYCysCgXKo1AmYNuNFwWn7ZQ4Ky1M=" - [mod."github.com/gogo/protobuf"] - version = "v1.3.2" - hash = "sha256-pogILFrrk+cAtb0ulqn9+gRZJ7sGnnLLdtqITvxvG6c=" [mod."github.com/google/btree"] version = "v1.1.3" hash = "sha256-/6Us2eNRFi2IIp7p5uPUXLridilAdk4SmZhcTYR0csw=" + [mod."github.com/google/cel-go"] + version = "v0.26.1" + hash = "sha256-XVL+pNGjmLrQefpB7qj419zWl1qhPVHmVxsP/Ro1AtE=" [mod."github.com/google/gnostic-models"] - version = "v0.7.0" - hash = "sha256-sxShRxqOUVlz9IkAz0C/NP/7CmLBW3ffwoZTdh+rIOc=" + version = "v0.7.1" + hash = "sha256-dfSFaYzgD4HrdL6ZsN8V9w0SMzx0WXl38dIy4dnjhhc=" [mod."github.com/google/go-cmp"] version = "v0.7.0" hash = "sha256-JbxZFBFGCh/Rj5XZ1vG94V2x7c18L8XKB0N9ZD5F2rM=" [mod."github.com/google/uuid"] version = "v1.6.0" hash = "sha256-VWl9sqUzdOuhW0KzQlv0gwwUQClYkmZwSydHG2sALYw=" + [mod."github.com/grpc-ecosystem/grpc-gateway/v2"] + version = "v2.27.4" + hash = "sha256-FSrLVW0wd3E5yQH5OOQBitILOiOjdl8jig7yj7JO+8s=" [mod."github.com/inconshreveable/mousetrap"] version = "v1.1.0" hash = "sha256-XWlYH0c8IcxAwQTnIi6WYqq44nOKUylSWxWO/vi+8pE=" - [mod."github.com/josharian/intern"] - version = "v1.0.0" - hash = "sha256-LJR0QE2vOQ2/2shBbO5Yl8cVPq+NFrE3ers0vu9FRP0=" [mod."github.com/json-iterator/go"] version = "v1.1.12" hash = "sha256-To8A0h+lbfZ/6zM+2PpRpY3+L6725OPC66lffq6fUoM=" - [mod."github.com/mailru/easyjson"] - version = "v0.7.7" - hash = "sha256-NVCz8MURpxgOjHXqxOZExqV4bnpHggpeAOyZDArjcy4=" [mod."github.com/mattn/go-colorable"] - version = "v0.1.13" - hash = "sha256-qb3Qbo0CELGRIzvw7NVM1g/aayaz4Tguppk9MD2/OI8=" + version = "v0.1.14" + hash = "sha256-JC60PjKj7MvhZmUHTZ9p372FV72I9Mxvli3fivTbxuA=" [mod."github.com/mattn/go-isatty"] version = "v0.0.20" hash = "sha256-qhw9hWtU5wnyFyuMbKx+7RB8ckQaFQ8D+8GKPkN3HHQ=" @@ -91,9 +127,6 @@ schema = 3 [mod."github.com/munnerz/goautoneg"] version = "v0.0.0-20191010083416-a7dc8b61c822" hash = "sha256-79URDDFenmGc9JZu+5AXHToMrtTREHb3BC84b/gym9Q=" - [mod."github.com/pkg/errors"] - version = "v0.9.1" - hash = "sha256-mNfQtcrQmu3sNg/7IwiieKWOgFQOVVe2yXgKBpe/wZw=" [mod."github.com/pmezard/go-difflib"] version = "v1.0.0" hash = "sha256-/FtmHnaGjdvEIKAJtrUfEhV7EVo5A/eYrtdnUkuxLDA=" @@ -104,80 +137,98 @@ schema = 3 version = "v0.6.2" hash = "sha256-q6Fh6v8iNJN9ypD47LjWmx66YITa3FyRjZMRsuRTFeQ=" [mod."github.com/prometheus/common"] - version = "v0.66.1" - hash = "sha256-bqHPaV9IV70itx63wqwgy2PtxMN0sn5ThVxDmiD7+Tk=" + version = "v0.67.5" + hash = "sha256-pDzmYsAANsaIf3W9HxpbgRnZ4BkPhJBBwzKq2E58FRw=" [mod."github.com/prometheus/procfs"] - version = "v0.16.1" - hash = "sha256-OBCvKlLW2obct35p0L9Q+1ZrxZjpTmbgHMP2rng9hpo=" + version = "v0.19.2" + hash = "sha256-PJW21pew9v+XA7Miow8JVPct+FPIHmQHphwO+g2kNWA=" [mod."github.com/spf13/afero"] version = "v1.15.0" hash = "sha256-LhcezbOqfuBzacytbqck0hNUxi6NbWNhifUc5/9uHQ8=" [mod."github.com/spf13/cobra"] - version = "v1.9.1" - hash = "sha256-dzEqquABE3UqZmJuj99244QjvfojS8cFlsPr/MXQGj0=" + version = "v1.10.2" + hash = "sha256-nbRCTFiDCC2jKK7AHi79n7urYCMP5yDZnWtNVJrDi+k=" [mod."github.com/spf13/pflag"] - version = "v1.0.6" - hash = "sha256-NjrK0FZPIfO/p2xtL1J7fOBQNTZAPZOC6Cb4aMMvhxI=" + version = "v1.0.10" + hash = "sha256-uDPnWjHpSrzXr17KEYEA1yAbizfcsfo5AyztY2tS6ZU=" + [mod."github.com/stoewer/go-strcase"] + version = "v1.3.1" + hash = "sha256-yptboRvbZtX+OEdlTgJnrCT+bvaMgCJp5B9ifEaSfw0=" [mod."github.com/x448/float16"] version = "v0.8.4" hash = "sha256-VKzMTMS9pIB/cwe17xPftCSK9Mf4Y6EuBEJlB4by5mE=" + [mod."go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"] + version = "v0.64.0" + hash = "sha256-xilqHTTNmvhxDFfTnE8ZytsrYq5gYFD77/glakljCy0=" [mod."go.opentelemetry.io/otel"] - version = "v1.35.0" - hash = "sha256-LHrBtBnyDtvJGtrXHMPIFe7U53B4bZzpePB4u8Xo4Bg=" + version = "v1.40.0" + hash = "sha256-Cu9ZCLMAd9kGsmpnvoyqwm0IkF4Uk6Xo+8OsP9l+wUQ=" + [mod."go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"] + version = "v1.39.0" + hash = "sha256-7pfSAaoIS1fbtVd9CCx6J4/DHBsmReon6r9Hocb2CCU=" + [mod."go.opentelemetry.io/otel/sdk/metric"] + version = "v1.39.0" + hash = "sha256-UkdZZhcFh+JcHzeUGmvGXqM2wmj17HHaXkjw/+vpbzg=" [mod."go.opentelemetry.io/otel/trace"] - version = "v1.35.0" - hash = "sha256-HC2+OGDe2rg0+E8WymQbUNoc249NXM1gIBJzK4UhcQE=" + version = "v1.40.0" + hash = "sha256-oPA3DfQ5vXhlVkBPksu/kKYBSrssefq4vtnd4vm9K8w=" + [mod."go.uber.org/zap"] + version = "v1.27.1" + hash = "sha256-bn/MMu7X3GkUuW12Xwn9JYbOJeEu9+yoQtkmO+36xlQ=" [mod."go.yaml.in/yaml/v2"] - version = "v2.4.2" - hash = "sha256-oC8RWdf1zbMYCtmR0ATy/kCkhIwPR9UqFZSMOKLVF/A=" + version = "v2.4.3" + hash = "sha256-WqfrOUQFvfuORgl1yyVOcsEXU/vwWQHkcVWx3vCxvaw=" [mod."go.yaml.in/yaml/v3"] version = "v3.0.4" hash = "sha256-NkGFiDPoCxbr3LFsI6OCygjjkY0rdmg5ggvVVwpyDQ4=" + [mod."golang.org/x/exp"] + version = "v0.0.0-20260112195511-716be5621a96" + hash = "sha256-rWqwXzLvvhcI/ZkOQMqCXMKI5FAuHd9YNoKTXujmboA=" [mod."golang.org/x/mod"] - version = "v0.26.0" - hash = "sha256-Ky2Z24x89S71fuuIKY1zwG3JttPmOfk+Mv/6YVT+CmM=" + version = "v0.32.0" + hash = "sha256-4gbgIqTOo0vcYV3l4MIwmT/h8H9PXmcfrJ3z4B26Zl0=" [mod."golang.org/x/net"] - version = "v0.43.0" - hash = "sha256-bf3iQFrsC8BoarVaS0uSspEFAcr1zHp1uziTtBpwV34=" + version = "v0.49.0" + hash = "sha256-arK6PWwO9tQUJVb57QXUEXfgcB6ISI6qjVB0eC4zcnw=" [mod."golang.org/x/oauth2"] - version = "v0.30.0" - hash = "sha256-btD7BUtQpOswusZY5qIU90uDo38buVrQ0tmmQ8qNHDg=" + version = "v0.34.0" + hash = "sha256-5eqpGGxJ7FJsPmfRek6roeGmkWHBMJaWYXyz8gXJsS4=" [mod."golang.org/x/sync"] - version = "v0.16.0" - hash = "sha256-sqKDRESeMzLe0jWGWltLZL/JIgrn0XaIeBWCzVN3Bks=" + version = "v0.19.0" + hash = "sha256-RbRZ+sKZUurOczGhhzOoY/sojTlta3H9XjL4PXX/cno=" [mod."golang.org/x/sys"] - version = "v0.35.0" - hash = "sha256-ZKM8pesQE6NAFZeKQ84oPn5JMhGr8g4TSwLYAsHMGSI=" + version = "v0.40.0" + hash = "sha256-KDe+wMr7dfMFwKMJEljzk+f82pQWFFPoFHivjD7qJGg=" [mod."golang.org/x/term"] - version = "v0.34.0" - hash = "sha256-faLolF6EUSSaC0ZwRiKH5JF/TmtcMQ+m+RWWl6Pk1PU=" + version = "v0.39.0" + hash = "sha256-diP4VknZDlJmhGQdcsXwI2+sFayQdsILFuxK1FBPaUE=" [mod."golang.org/x/text"] - version = "v0.28.0" - hash = "sha256-8UlJniGK+km4Hmrw6XMxELnExgrih7+z8tU26Cntmto=" + version = "v0.33.0" + hash = "sha256-XdA6D39ESuJkaaM/SRBnqZzjKUwi6Gbt1Si1nvauTr4=" [mod."golang.org/x/time"] - version = "v0.9.0" - hash = "sha256-ipaWVIk1+DZg0rfCzBSkz/Y6DEnB7xkX2RRYycHkhC0=" + version = "v0.14.0" + hash = "sha256-fVjpq0ieUHVEOTSElDVleMWvfdcqojZchqdUXiC7NnY=" [mod."golang.org/x/tools"] - version = "v0.35.0" - hash = "sha256-5aTV8oS9e0frUNUE2Pw+yTnPLghmZHryDa01COSyrCM=" - [mod."golang.org/x/tools/go/packages/packagestest"] - version = "v0.1.1-deprecated" - hash = "sha256-K3ljJg+gzsY/MAvrVSpWTzKlxOnXMCcsPHLQvH7JRbU=" + version = "v0.41.0" + hash = "sha256-/Plnksa1jSr4jYJc2oCH9fcjGbWocM7EYposMP0tScQ=" [mod."gomodules.xyz/jsonpatch/v2"] - version = "v2.4.0" - hash = "sha256-2NqdGCsk0DuSvN3BkL8AtkpL+acAzs2qsEeBIOb/jNg=" + version = "v2.5.0" + hash = "sha256-L3Xy24GTtcDHmMgc9rlgUm3GrxFO7XQKJhfYIr3li1s=" + [mod."google.golang.org/genproto/googleapis/api"] + version = "v0.0.0-20260114163908-3f89685c29c3" + hash = "sha256-X842u0vFs4rOKEX7anzjTAo6r6Rgavf9XBaG7ZjuwpY=" [mod."google.golang.org/genproto/googleapis/rpc"] - version = "v0.0.0-20250303144028-a0af3efb3deb" - hash = "sha256-l/2ByVhr10DBqSp5y1d8mtEY3++RUZKg89FCEptT0nQ=" + version = "v0.0.0-20260203192932-546029d2fa20" + hash = "sha256-gdgUw1LzgVOrarF1cGBUI9uoaR/d6lur2RwxUDKnOZA=" [mod."google.golang.org/grpc"] - version = "v1.72.1" - hash = "sha256-5JczomNvroKWtIYKDgXwaIaEfuNEK//MHPhJQiaxMXs=" + version = "v1.78.0" + hash = "sha256-oKsu3+Eae5tpFOZ9K2ZzYh1FgdYdEnEIB1C+UIxSD+E=" [mod."google.golang.org/protobuf"] version = "v1.36.11" hash = "sha256-7W+6jntfI/awWL3JP6yQedxqP5S9o3XvPgJ2XxxsIeE=" [mod."gopkg.in/evanphx/json-patch.v4"] - version = "v4.12.0" - hash = "sha256-rUOokb3XW30ftpHp0fsF2WiJln1S0FSt2El7fTHq3CM=" + version = "v4.13.0" + hash = "sha256-1iyZpBaeBLmNkJ3T4A9fAEXEYB9nk9V02ug4pwl5dy0=" [mod."gopkg.in/inf.v0"] version = "v0.9.1" hash = "sha256-z84XlyeWLcoYOvWLxPkPFgLkpjyb2Y4pdeGMyySOZQI=" @@ -188,50 +239,53 @@ schema = 3 version = "v3.0.1" hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU=" [mod."k8s.io/api"] - version = "v0.34.0" - hash = "sha256-sHtadLTgtwaPTQ5VJ68rREaylf4CNgFxlU2skUWYfnk=" + version = "v0.35.0" + hash = "sha256-eIie0MFXkmNsfiO58pg+ThJ1wPcYh3T7Gch9p2GrT64=" [mod."k8s.io/apiextensions-apiserver"] - version = "v0.34.0" - hash = "sha256-omktLB7chf0eejKODKjykVX7vvS0+ldlQHFsU1zs8po=" + version = "v0.35.0" + hash = "sha256-RZdGkV4SoCTY022pIzQbeVwaxIYhIpXapLZrD593gh8=" [mod."k8s.io/apimachinery"] - version = "v0.34.0" - hash = "sha256-y6GVugdaX81lHwVWgDgFoIi/v6K9A3YC2kKlGUritVU=" + version = "v0.35.0" + hash = "sha256-+dplbHUOfaCaD2E9IS4F3lnjSCr/a4LjTgdB9de92Pw=" [mod."k8s.io/client-go"] - version = "v0.34.0" - hash = "sha256-n4Ltf0hY7sfSun38xq0/oaR8S7ddGT1V6LVUv0j9T+4=" + version = "v0.35.0" + hash = "sha256-s+o7ybLe83chueBIVvYRibI2HCk+QQoWTjfXqmzsjHs=" [mod."k8s.io/code-generator"] - version = "v0.34.0" - hash = "sha256-OPhjvmu0MciOkGMTwryGRzz6nO+iyQFipqk987wmB5c=" + version = "v0.35.0" + hash = "sha256-0F8vNVdF/quBPGxOpxBL/GhupnkMoTE8dcZYX57RZKk=" [mod."k8s.io/component-base"] - version = "v0.34.0" - hash = "sha256-lTzENAobu25G3lTZ1IO5rmb0yTUgCUholLIW02is54A=" + version = "v0.35.0" + hash = "sha256-fIAmKs3/T8oHrXBX3sMWr/D1DGhyCsgM+6ZFdaA8BXU=" [mod."k8s.io/gengo/v2"] - version = "v2.0.0-20250604051438-85fd79dbfd9f" - hash = "sha256-5zImdaVKc5gPuxHA7apyJfGIDoeLE7e/aoWYvrhR4gA=" + version = "v2.0.0-20251215205346-5ee0d033ba5b" + hash = "sha256-FxD4b+cOzKuXsGI4NpsaUK/YTOMxugMGAh2jY3od3p8=" [mod."k8s.io/klog/v2"] version = "v2.130.1" hash = "sha256-n5vls1o1a0V0KYv+3SULq4q3R2Is15K8iDHhFlsSH4o=" [mod."k8s.io/kube-openapi"] - version = "v0.0.0-20250710124328-f3f2b991d03b" - hash = "sha256-0v0MN67pora3UCA8vXSJDgkosx/1RaB2HkjUnwdVLbY=" + version = "v0.0.0-20260127142750-a19766b6e2d4" + hash = "sha256-NS8NvGTX3Ycoc4JU/jwLgtNlD5OOQ5zk2hzvFFSD/jM=" [mod."k8s.io/utils"] - version = "v0.0.0-20250604170112-4c0f3b243397" - hash = "sha256-USPKRYYKfbhQWU0CgT/8V1hdBirWjmhTZvJCuuUlNFo=" + version = "v0.0.0-20260108192941-914a6e750570" + hash = "sha256-eFcd1fZT9M7wc/foeEAUj3jgHJfEY9U3lVqQTkIVJ44=" + [mod."sigs.k8s.io/apiserver-network-proxy/konnectivity-client"] + version = "v0.34.0" + hash = "sha256-98ScvhhmVxEVAGv9rhk10ceYUadNOuBERtCcdaIb42s=" [mod."sigs.k8s.io/controller-runtime"] - version = "v0.22.0" - hash = "sha256-eOcfWCVM5ivY4qB5XU1Vt1jkh0WXeoO7uVQP0CT/r6E=" + version = "v0.23.1" + hash = "sha256-iOaYAJgy/Q1Hi6afs5mLtP8K5J8Cs/MlDoGp8wE1GOY=" [mod."sigs.k8s.io/controller-tools"] - version = "v0.18.0" - hash = "sha256-p38I5tim3XYHWfO+nCQtymzZ1iy92m3F80HToSK0OoQ=" + version = "v0.20.0" + hash = "sha256-1/v8hCCykTDMjhx4jM84/v+WJlQ8M1whdgpGfgmSRRU=" [mod."sigs.k8s.io/json"] - version = "v0.0.0-20241014173422-cfa47c3a1cc8" - hash = "sha256-dkegDkyjp/niYirIdhbQrBYt/uttCZQAfsBzKSzOMh0=" + version = "v0.0.0-20250730193827-2d320260d730" + hash = "sha256-y3vUPJYL6oxu/8c0j4vgX6fzqHtVPSCjfyuWkZYf6+I=" [mod."sigs.k8s.io/randfill"] version = "v1.0.0" hash = "sha256-xldQxDwW84hmlihdSOFfjXyauhxEWV9KmIDLZMTcYNo=" [mod."sigs.k8s.io/structured-merge-diff/v6"] - version = "v6.3.0" - hash = "sha256-2EqUZSaHUhwTrdjoZuv+Z99tZYrX1E6rxf2ejeKd2BM=" + version = "v6.3.2-0.20260122202528-d9cc6641c482" + hash = "sha256-4ZUkeHKvdhsZmFSSZKAL/1GZdPO6735BY6FqRc+8tog=" [mod."sigs.k8s.io/yaml"] version = "v1.6.0" hash = "sha256-49hg7IVPzwxeovp+HTMiWa/10NMMTSTjAdCmIv6p9dw=" diff --git a/pkg/fieldpath/paved.go b/pkg/fieldpath/paved.go index 5835d6af5..2a0a527d4 100644 --- a/pkg/fieldpath/paved.go +++ b/pkg/fieldpath/paved.go @@ -326,6 +326,7 @@ func (p *Paved) GetStringObject(path string) (map[string]string, error) { } so := make(map[string]string) + for k, in := range o { s, ok := in.(string) if !ok { diff --git a/pkg/fieldpath/paved_test.go b/pkg/fieldpath/paved_test.go index aa0446779..47d2246bd 100644 --- a/pkg/fieldpath/paved_test.go +++ b/pkg/fieldpath/paved_test.go @@ -740,6 +740,7 @@ func TestSetValue(t *testing.T) { res := make([]any, DefaultMaxFieldPathIndex+2) res[0] = "a" res[DefaultMaxFieldPathIndex+1] = "c" + return res }(), }, diff --git a/pkg/gate/gate_test.go b/pkg/gate/gate_test.go index 5404f5d45..61243ee9d 100644 --- a/pkg/gate/gate_test.go +++ b/pkg/gate/gate_test.go @@ -103,12 +103,14 @@ func TestGateIntegration(t *testing.T) { reason: "Should call function when single dependency is met", setup: func(g *gate.Gate[string]) chan bool { called := make(chan bool, 1) + g.Register(func() { called <- true }, "condition1") // Set condition to true (will be initialized as false first) g.Set("condition1", true) + return called }, want: want{ @@ -119,6 +121,7 @@ func TestGateIntegration(t *testing.T) { reason: "Should call function when all dependencies are met", setup: func(g *gate.Gate[string]) chan bool { called := make(chan bool, 1) + g.Register(func() { called <- true }, "condition1", "condition2") @@ -126,6 +129,7 @@ func TestGateIntegration(t *testing.T) { // Set both conditions to true g.Set("condition1", true) g.Set("condition2", true) + return called }, want: want{ @@ -136,12 +140,14 @@ func TestGateIntegration(t *testing.T) { reason: "Should not call function when only some dependencies are met", setup: func(g *gate.Gate[string]) chan bool { called := make(chan bool, 1) + g.Register(func() { called <- true }, "condition1", "condition2") // Set only one condition to true g.Set("condition1", true) + return called }, want: want{ @@ -170,6 +176,7 @@ func TestGateIntegration(t *testing.T) { reason: "Should call function when dependency is met, even if unset later", setup: func(g *gate.Gate[string]) chan bool { called := make(chan bool, 1) + g.Register(func() { called <- true }, "condition1") @@ -177,6 +184,7 @@ func TestGateIntegration(t *testing.T) { // Set condition to true then false (function already called when true) g.Set("condition1", true) g.Set("condition1", false) + return called }, want: want{ @@ -187,6 +195,7 @@ func TestGateIntegration(t *testing.T) { reason: "Should call function only once even if conditions change after", setup: func(g *gate.Gate[string]) chan bool { called := make(chan bool, 2) // Buffer for potential multiple calls + g.Register(func() { called <- true }, "condition1") @@ -195,6 +204,7 @@ func TestGateIntegration(t *testing.T) { g.Set("condition1", true) g.Set("condition1", false) g.Set("condition1", true) + return called }, want: want{ @@ -244,15 +254,11 @@ func TestGateConcurrency(t *testing.T) { // Register functions concurrently for range numGoroutines { - wg.Add(1) - - go func() { - defer wg.Done() - + wg.Go(func() { g.Register(func() { callCount <- struct{}{} }, "shared-condition") - }() + }) } // Wait for all registrations diff --git a/pkg/meta/meta_test.go b/pkg/meta/meta_test.go index cb6d7399e..1a647f6a8 100644 --- a/pkg/meta/meta_test.go +++ b/pkg/meta/meta_test.go @@ -1087,6 +1087,7 @@ func TestExternalCreateSucceededDuring(t *testing.T) { o := &corev1.Pod{} t := time.Now().Add(-2 * time.Minute) SetExternalCreateSucceeded(o, t) + return o }(), d: 1 * time.Minute, @@ -1099,6 +1100,7 @@ func TestExternalCreateSucceededDuring(t *testing.T) { o := &corev1.Pod{} t := time.Now().Add(-30 * time.Second) SetExternalCreateSucceeded(o, t) + return o }(), d: 1 * time.Minute, @@ -1196,6 +1198,7 @@ func TestIsPaused(t *testing.T) { p.SetAnnotations(map[string]string{ AnnotationKeyReconciliationPaused: "true", }) + return p }(), want: true, @@ -1210,6 +1213,7 @@ func TestIsPaused(t *testing.T) { p.SetAnnotations(map[string]string{ AnnotationKeyReconciliationPaused: "", }) + return p }(), want: false, diff --git a/pkg/ratelimiter/reconciler_test.go b/pkg/ratelimiter/reconciler_test.go index 49012ede0..0067e3670 100644 --- a/pkg/ratelimiter/reconciler_test.go +++ b/pkg/ratelimiter/reconciler_test.go @@ -83,6 +83,7 @@ func TestReconcile(t *testing.T) { // Rate limit the request once. r := NewReconciler("test", inner, &predictableRateLimiter{d: 8 * time.Second}) r.Reconcile(context.Background(), reconcile.Request{NamespacedName: types.NamespacedName{Name: "limited"}}) + return r }(), args: args{ diff --git a/pkg/reconciler/customresourcesgate/reconciler_test.go b/pkg/reconciler/customresourcesgate/reconciler_test.go index 66cbb66d6..2ab6789ad 100644 --- a/pkg/reconciler/customresourcesgate/reconciler_test.go +++ b/pkg/reconciler/customresourcesgate/reconciler_test.go @@ -533,23 +533,25 @@ func TestReconcile(t *testing.T) { // Only check gate calls if gate is not nil if tc.fields.gate != nil { - slices.SortFunc(tc.want.trueCalls, func(a, b schema.GroupVersionKind) int { + sortGVK := func(a, b schema.GroupVersionKind) int { + if c := strings.Compare(a.Group, b.Group); c != 0 { + return c + } + if c := strings.Compare(a.Version, b.Version); c != 0 { + return c + } return strings.Compare(a.Kind, b.Kind) - }) - slices.SortFunc(tc.fields.gate.TrueCalls, func(a, b schema.GroupVersionKind) int { - return strings.Compare(a.Kind, b.Kind) - }) + } + + slices.SortFunc(tc.want.trueCalls, sortGVK) + slices.SortFunc(tc.fields.gate.TrueCalls, sortGVK) if diff := cmp.Diff(tc.want.trueCalls, tc.fields.gate.TrueCalls); diff != "" { t.Errorf("\n%s\ngate.True calls: -want, +got:\n%s", tc.reason, diff) } - slices.SortFunc(tc.want.falseCalls, func(a, b schema.GroupVersionKind) int { - return strings.Compare(a.Kind, b.Kind) - }) - slices.SortFunc(tc.fields.gate.FalseCalls, func(a, b schema.GroupVersionKind) int { - return strings.Compare(a.Kind, b.Kind) - }) + slices.SortFunc(tc.want.falseCalls, sortGVK) + slices.SortFunc(tc.fields.gate.FalseCalls, sortGVK) if diff := cmp.Diff(tc.want.falseCalls, tc.fields.gate.FalseCalls); diff != "" { t.Errorf("\n%s\ngate.False calls: -want, +got:\n%s", tc.reason, diff) diff --git a/pkg/reconciler/managed/api_test.go b/pkg/reconciler/managed/api_test.go index 344047e1d..16467f446 100644 --- a/pkg/reconciler/managed/api_test.go +++ b/pkg/reconciler/managed/api_test.go @@ -183,12 +183,14 @@ func TestAPISecretPublisher(t *testing.T) { fields: fields{ secret: resource.ApplyFn(func(ctx context.Context, o client.Object, ao ...resource.ApplyOption) error { want := resource.ConnectionSecretFor(mg, fake.GVK(mg)) + want.Data = cd for _, fn := range ao { if err := fn(ctx, o, want); err != nil { return err } } + return nil }), typer: fake.SchemeWith(&fake.LegacyManaged{}), @@ -208,10 +210,12 @@ func TestAPISecretPublisher(t *testing.T) { fields: fields{ secret: resource.ApplyFn(func(_ context.Context, o client.Object, _ ...resource.ApplyOption) error { want := resource.ConnectionSecretFor(mg, fake.GVK(mg)) + want.Data = cd if diff := cmp.Diff(want, o); diff != "" { t.Errorf("-want, +got:\n%s", diff) } + return nil }), typer: fake.SchemeWith(&fake.LegacyManaged{}), @@ -302,12 +306,14 @@ func TestAPILocalSecretPublisher(t *testing.T) { fields: fields{ secret: resource.ApplyFn(func(ctx context.Context, o client.Object, ao ...resource.ApplyOption) error { want := resource.LocalConnectionSecretFor(mg, fake.GVK(mg)) + want.Data = cd for _, fn := range ao { if err := fn(ctx, o, want); err != nil { return err } } + return nil }), typer: fake.SchemeWith(&fake.ModernManaged{}), @@ -327,10 +333,12 @@ func TestAPILocalSecretPublisher(t *testing.T) { fields: fields{ secret: resource.ApplyFn(func(_ context.Context, o client.Object, _ ...resource.ApplyOption) error { want := resource.LocalConnectionSecretFor(mg, fake.GVK(mg)) + want.Data = cd if diff := cmp.Diff(want, o); diff != "" { t.Errorf("-want, +got:\n%s", diff) } + return nil }), typer: fake.SchemeWith(&fake.ModernManaged{}), diff --git a/pkg/reconciler/managed/reconciler_legacy_test.go b/pkg/reconciler/managed/reconciler_legacy_test.go index 1edc057d9..0009a9fa6 100644 --- a/pkg/reconciler/managed/reconciler_legacy_test.go +++ b/pkg/reconciler/managed/reconciler_legacy_test.go @@ -95,6 +95,7 @@ func TestReconciler(t *testing.T) { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetDeletionPolicy(xpv1.DeletionOrphan) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -103,10 +104,12 @@ func TestReconciler(t *testing.T) { want.SetDeletionPolicy(xpv1.DeletionOrphan) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors unpublishing connection details should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -130,6 +133,7 @@ func TestReconciler(t *testing.T) { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetDeletionPolicy(xpv1.DeletionOrphan) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -138,10 +142,12 @@ func TestReconciler(t *testing.T) { want.SetDeletionPolicy(xpv1.DeletionOrphan) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors removing the managed resource finalizer should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -163,6 +169,7 @@ func TestReconciler(t *testing.T) { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetDeletionPolicy(xpv1.DeletionOrphan) + return nil }), }, @@ -184,10 +191,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors initializing the managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -212,6 +221,7 @@ func TestReconciler(t *testing.T) { mg.SetDeletionTimestamp(&now) mg.SetDeletionPolicy(xpv1.DeletionDelete) mg.SetFinalizers([]string{FinalizerName, "finalizer2"}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -231,6 +241,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -245,6 +256,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { asLegacyManaged(obj, 42) meta.SetExternalCreatePending(obj, now.Time) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -253,10 +265,12 @@ func TestReconciler(t *testing.T) { want.SetConditions( xpv1.Creating().WithObservedGeneration(42), xpv1.ReconcileError(errors.New(errCreateIncomplete)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "We should update our status when we're asked to reconcile a managed resource that is pending creation." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -278,10 +292,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors during reference resolution should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -306,10 +322,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, got client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileConnect)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, got, test.EquateConditions()); diff != "" { reason := "Errors connecting to the provider should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -334,10 +352,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful no-op reconcile should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -356,6 +376,7 @@ func TestReconciler(t *testing.T) { return errBoom }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -372,10 +393,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileObserve)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors observing the managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -393,6 +416,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -424,6 +448,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -438,6 +463,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -445,10 +471,12 @@ func TestReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileDelete)).WithObservedGeneration(42)) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "An error deleting an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -470,6 +498,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -484,6 +513,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -491,10 +521,12 @@ func TestReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A deleted external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -516,6 +548,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -530,6 +563,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -537,10 +571,12 @@ func TestReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors unpublishing connection details should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -559,6 +595,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), withConnectionPublishers(ConnectionPublisherFns{ @@ -576,6 +613,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -583,10 +621,12 @@ func TestReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors removing the managed resource finalizer should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -605,6 +645,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{RemoveFinalizerFn: func(_ context.Context, _ resource.Object) error { return errBoom }}), @@ -620,6 +661,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), }, @@ -638,6 +680,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{RemoveFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -654,10 +697,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors publishing connection details after observation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -686,10 +731,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors adding a finalizer should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -718,10 +765,12 @@ func TestReconciler(t *testing.T) { want.SetConditions( xpv1.Creating().WithObservedGeneration(42), xpv1.ReconcileError(errors.Wrap(errBoom, errUpdateManaged)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors while creating an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -743,6 +792,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -763,10 +813,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateFailed(want, time.Now()) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileCreate)).WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors while creating an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -788,6 +840,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), // We simulate our critical annotation update failing too here. @@ -811,10 +864,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errUpdateManagedAnnotations)).WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors updating critical annotations after creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -836,6 +891,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -857,10 +913,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors publishing connection details after creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -883,6 +941,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithCriticalAnnotationUpdater(CriticalAnnotationUpdateFn(func(_ context.Context, _ client.Object) error { return nil })), @@ -894,6 +953,7 @@ func TestReconciler(t *testing.T) { if _, ok := cd["create"]; ok { return false, errBoom } + return true, nil }, }), @@ -915,10 +975,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -943,6 +1005,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { asLegacyManaged(obj, 42) meta.SetExternalCreatePending(obj, now.Time) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -952,10 +1015,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -983,10 +1048,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errUpdateManaged)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors updating a managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1005,6 +1072,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1021,10 +1089,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful no-op reconcile should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1043,6 +1113,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1075,6 +1146,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1088,6 +1160,7 @@ func TestReconciler(t *testing.T) { if diff < 0 { diff = -diff } + return diff < time.Second })}, }, @@ -1117,6 +1190,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1154,6 +1228,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1179,10 +1254,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileUpdate)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors while updating an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1204,6 +1281,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1220,10 +1298,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors publishing connection details after an update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1246,6 +1326,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), withConnectionPublishers(ConnectionPublisherFns{ @@ -1256,6 +1337,7 @@ func TestReconciler(t *testing.T) { if _, ok := cd["update"]; ok { return false, errBoom } + return false, nil }, }), @@ -1273,10 +1355,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1298,6 +1382,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1314,10 +1399,12 @@ func TestReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1339,6 +1426,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1356,16 +1444,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "true"}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "true"}) want.SetConditions(xpv1.ReconcilePaused().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has the pause annotation with value "true", it should acquire "Synced" status condition with the status "False" and the reason "ReconcilePaused".` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1383,16 +1474,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{}) want.SetConditions(xpv1.ReconcilePaused().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has the pause annotation with value "true", it should acquire "Synced" status condition with the status "False" and the reason "ReconcilePaused".` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1416,16 +1510,19 @@ func TestReconciler(t *testing.T) { mg := asLegacyManaged(obj, 42) mg.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "false"}) mg.SetConditions(xpv1.ReconcilePaused()) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "false"}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `Managed resource should acquire Synced=False/ReconcileSuccess status condition after a resume.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1444,6 +1541,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1459,6 +1557,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "true"}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, _ client.Object, _ ...client.SubResourceUpdateOption) error { @@ -1479,16 +1578,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) want.SetConditions(xpv1.ReconcileError(fmt.Errorf(errFmtManagementPolicyNonDefault, xpv1.ManagementPolicies{xpv1.ManagementActionCreate})).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has a non default management policy but feature not enabled, it should return a proper error.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1506,16 +1608,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) want.SetConditions(xpv1.ReconcileError(fmt.Errorf(errFmtManagementPolicyNotSupported, xpv1.ManagementPolicies{xpv1.ManagementActionCreate})).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has non supported management policy, it should return a proper error.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1536,16 +1641,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) want.SetConditions(xpv1.ReconcileError(fmt.Errorf(errFmtManagementPolicyNotSupported, xpv1.ManagementPolicies{xpv1.ManagementActionAll})).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has non supported management policy, it should return a proper error.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1567,16 +1675,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errors.New(errExternalResourceNotExist), errReconcileObserve)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Resource does not exist should be reported as a conditioned status when ObserveOnly." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1595,6 +1706,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -1609,16 +1721,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors publishing connection details after observation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1637,6 +1752,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), withConnectionPublishers(ConnectionPublisherFns{ @@ -1656,16 +1772,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "With ObserveOnly, a successful managed resource observation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1684,6 +1803,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), withConnectionPublishers(ConnectionPublisherFns{ @@ -1704,6 +1824,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -1714,10 +1835,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1782,6 +1905,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -1792,10 +1916,12 @@ func TestReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1908,6 +2034,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionLateInitialize, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) + return nil }), MockUpdate: test.NewMockUpdateFn(errBoom), @@ -1915,10 +2042,12 @@ func TestReconciler(t *testing.T) { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionLateInitialize, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `Managed resource should acquire Synced=False/ReconcileSuccess status condition.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1941,6 +2070,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1956,16 +2086,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1988,6 +2121,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -2050,16 +2184,19 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -2082,6 +2219,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -2097,6 +2235,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionUpdate, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) + return nil }), MockUpdate: test.NewMockUpdateFn(errBoom), @@ -2104,10 +2243,12 @@ func TestReconciler(t *testing.T) { want := newLegacyManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionUpdate, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors updating a managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -2127,6 +2268,7 @@ func TestReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -2142,6 +2284,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asLegacyManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionLateInitialize}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2171,6 +2314,7 @@ func TestReconciler(t *testing.T) { xpv1.ManagementActionUpdate, xpv1.ManagementActionLateInitialize, }) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2742,6 +2886,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2780,6 +2925,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2817,6 +2963,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2855,6 +3002,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2875,6 +3023,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { // set a deletion timestamp, which should trigger a delete operation mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2897,6 +3046,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2917,6 +3067,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { // set a deletion timestamp, which should trigger a delete operation mg := asLegacyManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2940,6 +3091,7 @@ func TestLegacyReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, diff --git a/pkg/reconciler/managed/reconciler_modern_test.go b/pkg/reconciler/managed/reconciler_modern_test.go index 4e36604b7..833910074 100644 --- a/pkg/reconciler/managed/reconciler_modern_test.go +++ b/pkg/reconciler/managed/reconciler_modern_test.go @@ -95,6 +95,7 @@ func TestModernReconciler(t *testing.T) { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionCreate, xpv1.ManagementActionUpdate, xpv1.ManagementActionLateInitialize}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -103,10 +104,12 @@ func TestModernReconciler(t *testing.T) { want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionCreate, xpv1.ManagementActionUpdate, xpv1.ManagementActionLateInitialize}) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors unpublishing connection details should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -133,6 +136,7 @@ func TestModernReconciler(t *testing.T) { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionCreate, xpv1.ManagementActionUpdate, xpv1.ManagementActionLateInitialize}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -141,10 +145,12 @@ func TestModernReconciler(t *testing.T) { want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionCreate, xpv1.ManagementActionUpdate, xpv1.ManagementActionLateInitialize}) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors removing the managed resource finalizer should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -167,6 +173,7 @@ func TestModernReconciler(t *testing.T) { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), }, @@ -189,10 +196,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors initializing the managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -216,6 +225,7 @@ func TestModernReconciler(t *testing.T) { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) mg.SetFinalizers([]string{FinalizerName, "finalizer2"}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -235,6 +245,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -249,6 +260,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { asModernManaged(obj, 42) meta.SetExternalCreatePending(obj, now.Time) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -257,10 +269,12 @@ func TestModernReconciler(t *testing.T) { want.SetConditions( xpv1.Creating().WithObservedGeneration(42), xpv1.ReconcileError(errors.New(errCreateIncomplete)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "We should update our status when we're asked to reconcile a managed resource that is pending creation." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -282,10 +296,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors during reference resolution should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -310,10 +326,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, got client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileConnect)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, got, test.EquateConditions()); diff != "" { reason := "Errors connecting to the provider should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -338,10 +356,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful no-op reconcile should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -360,6 +380,7 @@ func TestModernReconciler(t *testing.T) { return errBoom }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -376,10 +397,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileObserve)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors observing the managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -397,6 +420,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -428,6 +452,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -442,6 +467,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -449,10 +475,12 @@ func TestModernReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileDelete)).WithObservedGeneration(42)) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "An error deleting an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -474,6 +502,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -488,6 +517,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -495,10 +525,12 @@ func TestModernReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A deleted external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -520,6 +552,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -534,6 +567,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -541,10 +575,12 @@ func TestModernReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors unpublishing connection details should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -563,6 +599,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), withLocalConnectionPublishers(LocalConnectionPublisherFns{ @@ -582,6 +619,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { @@ -589,10 +627,12 @@ func TestModernReconciler(t *testing.T) { want.SetDeletionTimestamp(&now) want.SetConditions(xpv1.Deleting().WithObservedGeneration(42)) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors removing the managed resource finalizer should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -611,6 +651,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{RemoveFinalizerFn: func(_ context.Context, _ resource.Object) error { return errBoom }}), @@ -626,6 +667,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), }, @@ -644,6 +686,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{RemoveFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -660,10 +703,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors publishing connection details after observation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -692,10 +737,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors adding a finalizer should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -724,10 +771,12 @@ func TestModernReconciler(t *testing.T) { want.SetConditions( xpv1.Creating().WithObservedGeneration(42), xpv1.ReconcileError(errors.Wrap(errBoom, errUpdateManaged)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors while creating an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -749,6 +798,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -769,10 +819,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateFailed(want, time.Now()) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileCreate)).WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors while creating an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -794,6 +846,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), // We simulate our critical annotation update failing too here. @@ -817,10 +870,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errUpdateManagedAnnotations)).WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors updating critical annotations after creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -842,6 +897,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -863,10 +919,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Errors publishing connection details after creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -889,6 +947,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithCriticalAnnotationUpdater(CriticalAnnotationUpdateFn(func(_ context.Context, _ client.Object) error { return nil })), @@ -900,6 +959,7 @@ func TestModernReconciler(t *testing.T) { if _, ok := cd["create"]; ok { return false, errBoom } + return true, nil }, }), @@ -921,10 +981,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -949,6 +1011,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { asModernManaged(obj, 42) meta.SetExternalCreatePending(obj, now.Time) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -958,10 +1021,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -989,10 +1054,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errUpdateManaged)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors updating a managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1011,6 +1078,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1027,10 +1095,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful no-op reconcile should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1049,6 +1119,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1081,6 +1152,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1094,6 +1166,7 @@ func TestModernReconciler(t *testing.T) { if diff < 0 { diff = -diff } + return diff < time.Second })}, }, @@ -1123,6 +1196,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1160,6 +1234,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1185,10 +1260,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errBoom, errReconcileUpdate)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors while updating an external resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1210,6 +1287,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1226,10 +1304,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors publishing connection details after an update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1252,6 +1332,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), withLocalConnectionPublishers(LocalConnectionPublisherFns{ @@ -1262,6 +1343,7 @@ func TestModernReconciler(t *testing.T) { if _, ok := cd["update"]; ok { return false, errBoom } + return false, nil }, }), @@ -1279,10 +1361,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1304,6 +1388,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1320,10 +1405,12 @@ func TestModernReconciler(t *testing.T) { MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1345,6 +1432,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1362,16 +1450,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "true"}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "true"}) want.SetConditions(xpv1.ReconcilePaused().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has the pause annotation with value "true", it should acquire "Synced" status condition with the status "False" and the reason "ReconcilePaused".` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1389,16 +1480,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{}) want.SetConditions(xpv1.ReconcilePaused().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has the pause annotation with value "true", it should acquire "Synced" status condition with the status "False" and the reason "ReconcilePaused".` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1422,16 +1516,19 @@ func TestModernReconciler(t *testing.T) { mg := asModernManaged(obj, 42) mg.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "false"}) mg.SetConditions(xpv1.ReconcilePaused()) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "false"}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `Managed resource should acquire Synced=False/ReconcileSuccess status condition after a resume.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1450,6 +1547,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1465,6 +1563,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetAnnotations(map[string]string{meta.AnnotationKeyReconciliationPaused: "true"}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, _ client.Object, _ ...client.SubResourceUpdateOption) error { @@ -1485,16 +1584,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) want.SetConditions(xpv1.ReconcileError(fmt.Errorf(errFmtManagementPolicyNonDefault, xpv1.ManagementPolicies{xpv1.ManagementActionCreate})).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has a non default management policy but feature not enabled, it should return a proper error.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1512,16 +1614,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionCreate}) want.SetConditions(xpv1.ReconcileError(fmt.Errorf(errFmtManagementPolicyNotSupported, xpv1.ManagementPolicies{xpv1.ManagementActionCreate})).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has non supported management policy, it should return a proper error.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1542,16 +1647,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) want.SetConditions(xpv1.ReconcileError(fmt.Errorf(errFmtManagementPolicyNotSupported, xpv1.ManagementPolicies{xpv1.ManagementActionAll})).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `If managed resource has non supported management policy, it should return a proper error.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1573,16 +1681,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) want.SetConditions(xpv1.ReconcileError(errors.Wrap(errors.New(errExternalResourceNotExist), errReconcileObserve)).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Resource does not exist should be reported as a conditioned status when ObserveOnly." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1601,6 +1712,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), }, @@ -1615,16 +1727,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) want.SetConditions(xpv1.ReconcileError(errBoom).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors publishing connection details after observation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1643,6 +1758,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), withLocalConnectionPublishers(LocalConnectionPublisherFns{ @@ -1662,16 +1778,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "With ObserveOnly, a successful managed resource observation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1690,6 +1809,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), withLocalConnectionPublishers(LocalConnectionPublisherFns{ @@ -1710,6 +1830,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -1720,10 +1841,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1788,6 +1911,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -1798,10 +1922,12 @@ func TestModernReconciler(t *testing.T) { meta.SetExternalCreateSucceeded(want, time.Now()) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) want.SetConditions(xpv1.Creating().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions(), cmpopts.EquateApproxTime(1*time.Second)); diff != "" { reason := "Successful managed resource creation should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1914,6 +2040,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionLateInitialize, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) + return nil }), MockUpdate: test.NewMockUpdateFn(errBoom), @@ -1921,10 +2048,12 @@ func TestModernReconciler(t *testing.T) { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionLateInitialize, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := `Managed resource should acquire Synced=False/ReconcileSuccess status condition.` t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1947,6 +2076,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -1962,16 +2092,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42).WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -1994,6 +2127,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -2056,16 +2190,19 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) + return nil }), MockStatusUpdate: test.MockSubResourceUpdateFn(func(_ context.Context, obj client.Object, _ ...client.SubResourceUpdateOption) error { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionAll}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "A successful managed resource update should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -2088,6 +2225,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -2103,6 +2241,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionUpdate, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) + return nil }), MockUpdate: test.NewMockUpdateFn(errBoom), @@ -2110,10 +2249,12 @@ func TestModernReconciler(t *testing.T) { want := newModernManaged(42) want.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionUpdate, xpv1.ManagementActionCreate, xpv1.ManagementActionDelete}) want.SetConditions(xpv1.ReconcileSuccess().WithObservedGeneration(42)) + if diff := cmp.Diff(want, obj, test.EquateConditions()); diff != "" { reason := "Errors updating a managed resource should be reported as a conditioned status." t.Errorf("\nReason: %s\n-want, +got:\n%s", reason, diff) } + return nil }), }, @@ -2133,6 +2274,7 @@ func TestModernReconciler(t *testing.T) { return nil }, } + return c, nil })), WithFinalizer(resource.FinalizerFns{AddFinalizerFn: func(_ context.Context, _ resource.Object) error { return nil }}), @@ -2148,6 +2290,7 @@ func TestModernReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { mg := asModernManaged(obj, 42) mg.SetManagementPolicies(xpv1.ManagementPolicies{xpv1.ManagementActionObserve, xpv1.ManagementActionLateInitialize}) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2177,6 +2320,7 @@ func TestModernReconciler(t *testing.T) { xpv1.ManagementActionUpdate, xpv1.ManagementActionLateInitialize, }) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2678,6 +2822,7 @@ func TestReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2716,6 +2861,7 @@ func TestReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2753,6 +2899,7 @@ func TestReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2791,6 +2938,7 @@ func TestReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2811,6 +2959,7 @@ func TestReconcilerChangeLogs(t *testing.T) { // set a deletion timestamp, which should trigger a delete operation mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2833,6 +2982,7 @@ func TestReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, @@ -2853,6 +3003,7 @@ func TestReconcilerChangeLogs(t *testing.T) { // set a deletion timestamp, which should trigger a delete operation mg := asModernManaged(obj, 42) mg.SetDeletionTimestamp(&now) + return nil }), MockUpdate: test.NewMockUpdateFn(nil), @@ -2876,6 +3027,7 @@ func TestReconcilerChangeLogs(t *testing.T) { return nil }, } + return c, nil })), }, diff --git a/pkg/reconciler/providerconfig/reconciler_test.go b/pkg/reconciler/providerconfig/reconciler_test.go index 452112b0f..a23ffaf8b 100644 --- a/pkg/reconciler/providerconfig/reconciler_test.go +++ b/pkg/reconciler/providerconfig/reconciler_test.go @@ -157,6 +157,7 @@ func TestReconciler(t *testing.T) { l.Items = []resource.ProviderConfigUsage{ &fake.ProviderConfigUsage{}, } + return nil }), MockDelete: test.NewMockDeleteFn(errBoom), @@ -182,6 +183,7 @@ func TestReconciler(t *testing.T) { pc := obj.(*fake.ProviderConfig) pc.SetDeletionTimestamp(&now) pc.SetUID(uid) + return nil }), MockList: test.NewMockListFn(nil, func(obj client.ObjectList) error { @@ -196,6 +198,7 @@ func TestReconciler(t *testing.T) { }, }, } + return nil }), MockStatusUpdate: test.NewMockSubResourceUpdateFn(nil), @@ -220,6 +223,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { pc := obj.(*fake.ProviderConfig) pc.SetDeletionTimestamp(&now) + return nil }), MockList: test.NewMockListFn(nil), @@ -245,6 +249,7 @@ func TestReconciler(t *testing.T) { MockGet: test.NewMockGetFn(nil, func(obj client.Object) error { pc := obj.(*fake.ProviderConfig) pc.SetDeletionTimestamp(&now) + return nil }), MockList: test.NewMockListFn(nil), diff --git a/pkg/reference/namespaced_reference_test.go b/pkg/reference/namespaced_reference_test.go index c345c3ea4..42c35669f 100644 --- a/pkg/reference/namespaced_reference_test.go +++ b/pkg/reference/namespaced_reference_test.go @@ -225,6 +225,7 @@ func TestNamespacedResolve(t *testing.T) { } t.Errorf("Resolve did not infer to the MR namespace: %v", key) + return errBoom }, }, @@ -258,6 +259,7 @@ func TestNamespacedResolve(t *testing.T) { } t.Errorf("Resolve did not infer to the other namespace: %v", key) + return errBoom }, }, @@ -646,6 +648,7 @@ func TestNamespacedResolveMultiple(t *testing.T) { } t.Errorf("Resolve did not infer to the MR namespace: %v", key) + return errBoom }, }, @@ -674,6 +677,7 @@ func TestNamespacedResolveMultiple(t *testing.T) { } t.Errorf("Resolve did not infer to the MR namespace: %v", key) + return errBoom }, }, @@ -707,6 +711,7 @@ func TestNamespacedResolveMultiple(t *testing.T) { } t.Errorf("Resolve did not infer to the MR namespace: %v", key) + return errBoom }, }, diff --git a/pkg/resource/api_test.go b/pkg/resource/api_test.go index 73729fbe7..42122a21b 100644 --- a/pkg/resource/api_test.go +++ b/pkg/resource/api_test.go @@ -258,6 +258,7 @@ func TestAPIUpdatingApplicator(t *testing.T) { if diff := cmp.Diff(*desired, *o.(*object)); diff != "" { t.Errorf("r: -want, +got:\n%s", diff) } + return nil }), }, diff --git a/pkg/resource/predicates_test.go b/pkg/resource/predicates_test.go index 6ce788aa6..45f67611a 100644 --- a/pkg/resource/predicates_test.go +++ b/pkg/resource/predicates_test.go @@ -67,6 +67,7 @@ func TestDesiredStateChanged(t *testing.T) { new: func() client.Object { mg := &fake.Managed{} mg.SetConditions(runtimev1.ReconcileSuccess()) + return mg }(), }, @@ -83,6 +84,7 @@ func TestDesiredStateChanged(t *testing.T) { new: func() client.Object { mg := &fake.Managed{} mg.SetAnnotations(map[string]string{meta.AnnotationKeyExternalCreatePending: time.Now().String()}) + return mg }(), }, @@ -99,6 +101,7 @@ func TestDesiredStateChanged(t *testing.T) { new: func() client.Object { mg := &fake.Managed{} mg.SetAnnotations(map[string]string{"foo": "bar"}) + return mg }(), }, @@ -115,6 +118,7 @@ func TestDesiredStateChanged(t *testing.T) { new: func() client.Object { mg := &fake.Managed{} mg.SetLabels(map[string]string{"foo": "bar"}) + return mg }(), }, @@ -128,11 +132,13 @@ func TestDesiredStateChanged(t *testing.T) { old: func() client.Object { mg := &fake.Managed{} mg.SetGeneration(1) + return mg }(), new: func() client.Object { mg := &fake.Managed{} mg.SetGeneration(2) + return mg }(), }, diff --git a/pkg/resource/providerconfig_test.go b/pkg/resource/providerconfig_test.go index 1c8b1438a..57a49f891 100644 --- a/pkg/resource/providerconfig_test.go +++ b/pkg/resource/providerconfig_test.go @@ -175,6 +175,7 @@ func TestExtractSecret(t *testing.T) { s.Data = map[string][]byte{ "creds": credentials, } + return nil }), }, @@ -286,6 +287,7 @@ func TestTrackLegacy(t *testing.T) { return err } } + return errBoom }), of: &fake.LegacyProviderConfigUsage{}, @@ -380,6 +382,7 @@ func TestTrackModern(t *testing.T) { return err } } + return errBoom }), of: &fake.ProviderConfigUsage{}, diff --git a/pkg/resource/unstructured/client.go b/pkg/resource/unstructured/client.go index 571cc4a87..4f6251f37 100644 --- a/pkg/resource/unstructured/client.go +++ b/pkg/resource/unstructured/client.go @@ -19,6 +19,7 @@ package unstructured import ( "context" + "fmt" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -204,3 +205,16 @@ func (c *wrapperStatusClient) Patch(ctx context.Context, obj client.Object, patc return c.kube.Patch(ctx, obj, patch, opts...) } + +// Apply applies the given object's subresource. obj must be a struct +// pointer so that obj can be updated with the content returned by the +// Server. Returns an error if an unstructured object is used due to +// how the underlying client works. This method is only added to +// satisfy the client.SubResourceWriter interface. +func (c *wrapperStatusClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error { + if u, ok := obj.(Wrapper); ok { + return fmt.Errorf("cannot apply status for unstructured %T; use a typed ApplyConfiguration or Patch with ApplyPatchType", u) + } + + return c.kube.Apply(ctx, obj, opts...) +} diff --git a/pkg/resource/unstructured/client_test.go b/pkg/resource/unstructured/client_test.go index adb6b898c..ebc986aeb 100644 --- a/pkg/resource/unstructured/client_test.go +++ b/pkg/resource/unstructured/client_test.go @@ -90,6 +90,7 @@ func TestGet(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -99,6 +100,7 @@ func TestGet(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -134,6 +136,7 @@ func TestList(t *testing.T) { if u.GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrappedList()}, @@ -144,6 +147,7 @@ func TestList(t *testing.T) { if u.GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrappedList()}, @@ -178,6 +182,7 @@ func TestCreate(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -187,6 +192,7 @@ func TestCreate(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -221,6 +227,7 @@ func TestDelete(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -230,6 +237,7 @@ func TestDelete(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -264,6 +272,7 @@ func TestUpdate(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -273,6 +282,7 @@ func TestUpdate(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -308,6 +318,7 @@ func TestPatch(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -317,6 +328,7 @@ func TestPatch(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -351,6 +363,7 @@ func TestDeleteAllOf(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -360,6 +373,7 @@ func TestDeleteAllOf(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -395,6 +409,7 @@ func TestStatusCreate(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -404,6 +419,7 @@ func TestStatusCreate(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -438,6 +454,7 @@ func TestStatusUpdate(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -447,6 +464,7 @@ func TestStatusUpdate(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, @@ -482,6 +500,7 @@ func TestStatusPatch(t *testing.T) { if obj.(metav1.Object).GetName() != nameUnwrapped { return errWrapped } + return nil })}, args: args{obj: NewUnwrapped()}, @@ -491,6 +510,7 @@ func TestStatusPatch(t *testing.T) { if obj.(metav1.Object).GetName() != nameWrapped { return errUnwrapped } + return nil })}, args: args{obj: NewWrapped()}, diff --git a/pkg/test/fake.go b/pkg/test/fake.go index c3827672d..2ec4a74f6 100644 --- a/pkg/test/fake.go +++ b/pkg/test/fake.go @@ -63,6 +63,9 @@ type MockSubResourceUpdateFn func(ctx context.Context, obj client.Object, opts . // A MockSubResourcePatchFn is used to mock client.SubResourceClient's patch implementation. type MockSubResourcePatchFn func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error +// A MockSubResourceApplyFn is used to mock client.SubResourceClient's apply implementation. +type MockSubResourceApplyFn func(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error + // A MockSchemeFn is used to mock client.Client's Scheme implementation. type MockSchemeFn func() *runtime.Scheme @@ -187,6 +190,7 @@ func NewMockApplyFn(err error, afn ...ApplyFn) MockApplyFn { return fnErr } } + return err } } @@ -398,6 +402,7 @@ type MockSubResourceClient struct { MockCreate MockSubResourceCreateFn MockUpdate MockSubResourceUpdateFn MockPatch MockSubResourcePatchFn + MockApply MockSubResourceApplyFn } // Get a sub-resource. @@ -419,3 +424,8 @@ func (m *MockSubResourceClient) Update(ctx context.Context, obj client.Object, o func (m *MockSubResourceClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error { return m.MockPatch(ctx, obj, patch, opts...) } + +// Apply a sub-resource. +func (m *MockSubResourceClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error { + return m.MockApply(ctx, obj, opts...) +} diff --git a/pkg/webhook/mutator_test.go b/pkg/webhook/mutator_test.go index b2b197899..3605026d4 100644 --- a/pkg/webhook/mutator_test.go +++ b/pkg/webhook/mutator_test.go @@ -23,13 +23,17 @@ import ( "github.com/google/go-cmp/cmp" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "github.com/crossplane/crossplane-runtime/v2/pkg/test" ) -// Mutator has to satisfy CustomDefaulter interface so that it can be used by -// controller-runtime Manager. -var _ webhook.CustomDefaulter = &Mutator{} +var ( + // Mutator has to satisfy CustomDefaulter interface so that it can be used by + // controller-runtime Manager. + _ webhook.CustomDefaulter = &Mutator{} //nolint:staticcheck // Testing deprecated interface for backwards compatibility. + _ admission.Defaulter[runtime.Object] = &Mutator{} +) func TestDefault(t *testing.T) { type args struct { diff --git a/pkg/webhook/validator_test.go b/pkg/webhook/validator_test.go index 15da0900a..a169ee822 100644 --- a/pkg/webhook/validator_test.go +++ b/pkg/webhook/validator_test.go @@ -30,9 +30,12 @@ import ( "github.com/crossplane/crossplane-runtime/v2/pkg/test" ) -// Validator has to satisfy CustomValidator interface so that it can be used by -// controller-runtime Manager. -var _ webhook.CustomValidator = &Validator{} +var ( + // Validator has to satisfy CustomValidator interface so that it can be used by + // controller-runtime Manager. + _ webhook.CustomValidator = &Validator{} //nolint:staticcheck // Testing deprecated interface for backwards compatibility. + _ admission.Validator[runtime.Object] = &Validator{} +) var ( errBoom = errors.New("boom")