diff --git a/.github/workflows/kind_e2e.yaml b/.github/workflows/kind_e2e.yaml index eda30b41..d3eac678 100644 --- a/.github/workflows/kind_e2e.yaml +++ b/.github/workflows/kind_e2e.yaml @@ -173,6 +173,7 @@ jobs: export TEST_OUTPUT_FILE=$GITHUB_WORKSPACE/test-e2e-kind.json echo "TEST_OUTPUT_FILE=$TEST_OUTPUT_FILE" >> $GITHUB_ENV export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} + export TEST_DAPR_HA_MODE=${{ matrix.mode }} make e2e-build-run-k8s shell: bash - name: Run tests with Docker hub @@ -181,6 +182,7 @@ jobs: export TEST_OUTPUT_FILE=$GITHUB_WORKSPACE/test-e2e-kind.json echo "TEST_OUTPUT_FILE=$TEST_OUTPUT_FILE" >> $GITHUB_ENV export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} + export TEST_DAPR_HA_MODE=${{ matrix.mode }} make e2e-build-run-k8s shell: bash - name: Upload test results diff --git a/.github/workflows/upgrade_e2e.yaml b/.github/workflows/upgrade_e2e.yaml index 5c34bcf9..83ebfb87 100644 --- a/.github/workflows/upgrade_e2e.yaml +++ b/.github/workflows/upgrade_e2e.yaml @@ -137,6 +137,7 @@ jobs: run: | export TEST_OUTPUT_FILE=$GITHUB_WORKSPACE/test-e2e-upgrade-kind.json echo "TEST_OUTPUT_FILE=$TEST_OUTPUT_FILE" >> $GITHUB_ENV + export TEST_DAPR_HA_MODE=${{ matrix.mode }} make e2e-build-run-upgrade - name: Run tests with Docker hub @@ -144,6 +145,7 @@ jobs: run: | export TEST_OUTPUT_FILE=$GITHUB_WORKSPACE/test-e2e-upgrade-kind.json echo "TEST_OUTPUT_FILE=$TEST_OUTPUT_FILE" >> $GITHUB_ENV + export TEST_DAPR_HA_MODE=${{ matrix.mode }} make e2e-build-run-upgrade - name: Upload test results diff --git a/Makefile b/Makefile index 298c35d2..3bc4b400 100644 --- a/Makefile +++ b/Makefile @@ -174,7 +174,7 @@ e2e-build-run-k8s: build test-e2e-k8s ################################################################################ .PHONY: test-e2e-upgrade test-e2e-upgrade: test-deps - gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 40m -count=1 -tags=e2e ./tests/e2e/upgrade/... + gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 60m -count=1 -tags=e2e ./tests/e2e/upgrade/... ################################################################################ # Build, E2E Tests for Kubernetes Upgrade # diff --git a/cmd/run.go b/cmd/run.go index 31c4f6fa..6feaf20b 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -510,6 +510,8 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) ( // Set defaults if zero value provided in config yaml. app.RunConfig.SetDefaultFromSchema() + app.RunConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, app.RunConfig.SchedulerHostAddress) + // Validate validates the configs and modifies the ports to free ports, appId etc. err := app.RunConfig.Validate() if err != nil { @@ -527,8 +529,6 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) ( break } - runConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, runConfig.SchedulerHostAddress) - // Combined multiwriter for logs. var appDaprdWriter io.Writer // appLogWriter is used when app command is present. @@ -674,7 +674,7 @@ func validateSchedulerHostAddress(version, address string) string { // If no SchedulerHostAddress is supplied, set it to default value. if semver.Compare(fmt.Sprintf("v%v", version), "v1.15.0-rc.0") == 1 { if address == "" { - return "localhost:50006" + return "localhost" } } return address diff --git a/go.mod b/go.mod index f4cfec86..ca2ad965 100644 --- a/go.mod +++ b/go.mod @@ -25,26 +25,27 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.13.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 golang.org/x/mod v0.22.0 golang.org/x/sys v0.28.0 gopkg.in/yaml.v2 v2.4.0 - helm.sh/helm/v3 v3.16.4 - k8s.io/api v0.31.3 - k8s.io/apiextensions-apiserver v0.31.3 - k8s.io/apimachinery v0.31.3 - k8s.io/cli-runtime v0.31.3 - k8s.io/client-go v0.31.3 + helm.sh/helm/v3 v3.17.1 + k8s.io/api v0.32.1 + k8s.io/apiextensions-apiserver v0.32.1 + k8s.io/apimachinery v0.32.1 + k8s.io/cli-runtime v0.32.1 + k8s.io/client-go v0.32.1 k8s.io/helm v2.16.10+incompatible sigs.k8s.io/yaml v1.4.0 ) require ( + cel.dev/expr v0.18.0 // indirect contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect dario.cat/mergo v1.0.1 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect github.com/Code-Hex/go-generics-cache v1.3.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -66,11 +67,11 @@ require ( github.com/chebyrash/promise v0.0.0-20230709133807-42ec49ba1459 // indirect github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.14.0 // indirect github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect - github.com/containerd/containerd v1.7.23 // indirect + github.com/containerd/containerd v1.7.24 // indirect github.com/containerd/errdefs v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect - github.com/cyphar/filepath-securejoin v0.3.4 // indirect + github.com/cyphar/filepath-securejoin v0.3.6 // indirect github.com/dapr/components-contrib v1.15.0-rc.1.0.20241216170750-aca5116d95c9 // indirect github.com/dapr/durabletask-go v0.5.1-0.20241216172832-16da3e7c3530 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -85,7 +86,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.9.0+incompatible // indirect - github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect + github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect @@ -99,16 +100,16 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.20.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.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.20.1 // indirect + github.com/google/cel-go v0.22.0 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -126,7 +127,6 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jhump/protoreflect v1.15.3 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect @@ -154,7 +154,7 @@ require ( github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/spdystream v0.4.0 // indirect + github.com/moby/spdystream v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -176,7 +176,7 @@ require ( github.com/prometheus/common v0.59.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/rubenv/sql-migrate v1.7.0 // indirect + github.com/rubenv/sql-migrate v1.7.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect @@ -188,7 +188,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spiffe/go-spiffe/v2 v2.1.7 // indirect - github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -213,7 +213,6 @@ require ( go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect - go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect @@ -222,7 +221,7 @@ require ( golang.org/x/sync v0.10.0 // indirect golang.org/x/term v0.27.0 // indirect golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.6.0 // indirect + golang.org/x/time v0.7.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect google.golang.org/grpc v1.68.1 // indirect @@ -231,16 +230,16 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.31.3 // indirect - k8s.io/component-base v0.31.3 // indirect + k8s.io/apiserver v0.32.1 // indirect + k8s.io/component-base v0.32.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/kubectl v0.31.3 // indirect - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/kubectl v0.32.1 // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect oras.land/oras-go v1.2.5 // indirect sigs.k8s.io/controller-runtime v0.19.0 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.17.2 // indirect - sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/kustomize/api v0.18.0 // indirect + sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect ) diff --git a/go.sum b/go.sum index 8f231a79..e953ca2d 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= +cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -47,8 +49,8 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= @@ -137,8 +139,8 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ= -github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= +github.com/containerd/containerd v1.7.24 h1:zxszGrGjrra1yYJW/6rhm9cJ1ZQ8rkKBR48brqsa7nA= +github.com/containerd/containerd v1.7.24/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= @@ -151,8 +153,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.3.4 h1:VBWugsJh2ZxJmLFSM06/0qzQyiQX2Qs0ViKrUAcqdZ8= -github.com/cyphar/filepath-securejoin v0.3.4/go.mod h1:8s/MCNJREmFK0H02MF6Ihv1nakJe4L/w3WZLHNkvlYM= +github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM= +github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/dapr/components-contrib v1.15.0-rc.1.0.20241216170750-aca5116d95c9 h1:y68C9PNQKZULAd+z9VsflNgpBGafwnrk+sYl57tBYeA= github.com/dapr/components-contrib v1.15.0-rc.1.0.20241216170750-aca5116d95c9/go.mod h1:jzKIWl+mK+iH2COvGMcc4sV1fFeB8RZ5q312CF2ZKok= github.com/dapr/dapr v1.15.0-rc.3.0.20250107220753-e073759df4c1 h1:6yP8F13xHAkBvxkgBQILA+lwVD7ISouzeXNSnIfx//Y= @@ -205,8 +207,8 @@ github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lSh github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= -github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= -github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= +github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= @@ -257,13 +259,13 @@ github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +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.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/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-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -318,8 +320,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 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/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= -github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= +github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -353,8 +355,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -403,8 +405,6 @@ github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= @@ -496,8 +496,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= -github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU= +github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= @@ -525,10 +525,10 @@ github.com/nightlyone/lockfile v1.0.0 h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAm github.com/nightlyone/lockfile v1.0.0/go.mod h1:rywoIealpdNse2r832aiD9jRk8ErCatROs6LzC841CI= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -599,8 +599,8 @@ github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rubenv/sql-migrate v1.7.0 h1:HtQq1xyTN2ISmQDggnh0c9U3JlP8apWh8YO2jzlXpTI= -github.com/rubenv/sql-migrate v1.7.0/go.mod h1:S4wtDEG1CKn+0ShpTtzWhFpHHI5PvCUtiGI+C+Z2THE= +github.com/rubenv/sql-migrate v1.7.1 h1:f/o0WgfO/GqNuVg+6801K/KW3WdDSupzSjDYODmiUq4= +github.com/rubenv/sql-migrate v1.7.1/go.mod h1:Ob2Psprc0/3ggbM6wCzyYVFFuc6FyZrb2AS+ezLDFb4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= @@ -634,8 +634,8 @@ github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/spiffe/go-spiffe/v2 v2.1.7 h1:VUkM1yIyg/x8X7u1uXqSRVRCdMdfRIEdFBzpqoeASGk= github.com/spiffe/go-spiffe/v2 v2.1.7/go.mod h1:QJDGdhXllxjxvd5B+2XnhhXB/+rC8gr+lNrtOryiWeE= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -652,8 +652,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -721,8 +721,6 @@ go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQD go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= -go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= -go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -908,7 +906,6 @@ golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -924,8 +921,8 @@ golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1114,8 +1111,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -helm.sh/helm/v3 v3.16.4 h1:rBn/h9MACw+QlhxQTjpl8Ifx+VTWaYsw3rguGBYBzr0= -helm.sh/helm/v3 v3.16.4/go.mod h1:k8QPotUt57wWbi90w3LNmg3/MWcLPigVv+0/X4B8BzA= +helm.sh/helm/v3 v3.17.1 h1:gzVoAD+qVuoJU6KDMSAeo0xRJ6N1znRxz3wyuXRmJDk= +helm.sh/helm/v3 v3.17.1/go.mod h1:nvreuhuR+j78NkQcLC3TYoprCKStLyw5P4T7E5itv2w= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1123,30 +1120,30 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= -k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= -k8s.io/apiextensions-apiserver v0.31.3 h1:+GFGj2qFiU7rGCsA5o+p/rul1OQIq6oYpQw4+u+nciE= -k8s.io/apiextensions-apiserver v0.31.3/go.mod h1:2DSpFhUZZJmn/cr/RweH1cEVVbzFw9YBu4T+U3mf1e4= -k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= -k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/apiserver v0.31.3 h1:+1oHTtCB+OheqFEz375D0IlzHZ5VeQKX1KGXnx+TTuY= -k8s.io/apiserver v0.31.3/go.mod h1:PrxVbebxrxQPFhJk4powDISIROkNMKHibTg9lTRQ0Qg= -k8s.io/cli-runtime v0.31.3 h1:fEQD9Xokir78y7pVK/fCJN090/iYNrLHpFbGU4ul9TI= -k8s.io/cli-runtime v0.31.3/go.mod h1:Q2jkyTpl+f6AtodQvgDI8io3jrfr+Z0LyQBPJJ2Btq8= -k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= -k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= -k8s.io/component-base v0.31.3 h1:DMCXXVx546Rfvhj+3cOm2EUxhS+EyztH423j+8sOwhQ= -k8s.io/component-base v0.31.3/go.mod h1:xME6BHfUOafRgT0rGVBGl7TuSg8Z9/deT7qq6w7qjIU= +k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc= +k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k= +k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= +k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= +k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs= +k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apiserver v0.32.1 h1:oo0OozRos66WFq87Zc5tclUX2r0mymoVHRq8JmR7Aak= +k8s.io/apiserver v0.32.1/go.mod h1:UcB9tWjBY7aryeI5zAgzVJB/6k7E97bkr1RgqDz0jPw= +k8s.io/cli-runtime v0.32.1 h1:19nwZPlYGJPUDbhAxDIS2/oydCikvKMHsxroKNGA2mM= +k8s.io/cli-runtime v0.32.1/go.mod h1:NJPbeadVFnV2E7B7vF+FvU09mpwYlZCu8PqjzfuOnkY= +k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= +k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= +k8s.io/component-base v0.32.1 h1:/5IfJ0dHIKBWysGV0yKTFfacZ5yNV1sulPh3ilJjRZk= +k8s.io/component-base v0.32.1/go.mod h1:j1iMMHi/sqAHeG5z+O9BFNCF698a1u0186zkjMZQ28w= k8s.io/helm v2.16.10+incompatible h1:eFksERw3joHEL62TrcDX8I5fgEQJvit4qxxPXAkYTyQ= k8s.io/helm v2.16.10+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= 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-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/kubectl v0.31.3 h1:3r111pCjPsvnR98oLLxDMwAeM6OPGmPty6gSKaLTQes= -k8s.io/kubectl v0.31.3/go.mod h1:lhMECDCbJN8He12qcKqs2QfmVo9Pue30geovBVpH5fs= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/kubectl v0.32.1 h1:/btLtXLQUU1rWx8AEvX9jrb9LaI6yeezt3sFALhB8M8= +k8s.io/kubectl v0.32.1/go.mod h1:sezNuyWi1STk4ZNPVRIFfgjqMI6XMf+oCVLjZen/pFQ= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo= oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -1154,13 +1151,13 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g= -sigs.k8s.io/kustomize/api v0.17.2/go.mod h1:UWTz9Ct+MvoeQsHcJ5e+vziRRkwimm3HytpZgIYqye0= -sigs.k8s.io/kustomize/kyaml v0.17.1 h1:TnxYQxFXzbmNG6gOINgGWQt09GghzgTP6mIurOgrLCQ= -sigs.k8s.io/kustomize/kyaml v0.17.1/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/kustomize/api v0.18.0 h1:hTzp67k+3NEVInwz5BHyzc9rGxIauoXferXyjv5lWPo= +sigs.k8s.io/kustomize/api v0.18.0/go.mod h1:f8isXnX+8b+SGLHQ6yO4JG1rdkZlvhaCf/uZbLVMb0U= +sigs.k8s.io/kustomize/kyaml v0.18.1 h1:WvBo56Wzw3fjS+7vBjN6TeivvpbW9GmRaWZ9CIVmt4E= +sigs.k8s.io/kustomize/kyaml v0.18.1/go.mod h1:C3L2BFVU1jgcddNBE1TxuVLgS46TjObMwW5FT9FcjYo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/kubernetes/upgrade.go b/pkg/kubernetes/upgrade.go index eab2b341..55dbc3cf 100644 --- a/pkg/kubernetes/upgrade.go +++ b/pkg/kubernetes/upgrade.go @@ -14,16 +14,22 @@ limitations under the License. package kubernetes import ( + "context" + "errors" "fmt" "net/http" "os" + "strings" "time" helm "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/release" + core_v1 "k8s.io/api/core/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/helm/pkg/strvals" + "github.com/Masterminds/semver/v3" "github.com/hashicorp/go-version" "github.com/dapr/cli/pkg/print" @@ -48,6 +54,8 @@ var crdsFullResources = []string{ "httpendpoints.dapr.io", } +var versionWithHAScheduler = semver.MustParse("1.15.0-rc.1") + type UpgradeConfig struct { RuntimeVersion string DashboardVersion string @@ -156,6 +164,10 @@ func Upgrade(conf UpgradeConfig) error { return err } + // used to signal the deletion of the scheduler pods only when downgrading from 1.15 to previous versions to handle incompatible changes + // in other cases the channel should be nil + var downgradeDeletionChan chan error + if !isDowngrade(conf.RuntimeVersion, daprVersion) { err = applyCRDs("v" + conf.RuntimeVersion) if err != nil { @@ -163,6 +175,31 @@ func Upgrade(conf UpgradeConfig) error { } } else { print.InfoStatusEvent(os.Stdout, "Downgrade detected, skipping CRDs.") + + targetVersion, errVersion := semver.NewVersion(conf.RuntimeVersion) + if errVersion != nil { + return fmt.Errorf("unable to parse dapr target version: %w", errVersion) + } + + currentVersion, errVersion := semver.NewVersion(daprVersion) + if errVersion != nil { + return fmt.Errorf("unable to parse dapr current version: %w", errVersion) + } + + if currentVersion.GreaterThanEqual(versionWithHAScheduler) && targetVersion.LessThan(versionWithHAScheduler) { + downgradeDeletionChan = make(chan error) + // Must delete all scheduler pods from cluster due to incompatible changes in version 1.15 with older versions. + go func() { + // Add an artificial delay to allow helm upgrade to progress and delete the pods only when necessary. + time.Sleep(15 * time.Second) + errDeletion := deleteSchedulerPods(status[0].Namespace, currentVersion, targetVersion) + if errDeletion != nil { + downgradeDeletionChan <- fmt.Errorf("failed to delete scheduler pods: %w", errDeletion) + print.FailureStatusEvent(os.Stderr, "Failed to delete scheduler pods: "+errDeletion.Error()) + } + close(downgradeDeletionChan) + }() + } } chart, err := GetDaprHelmChartName(helmConf) @@ -179,6 +216,15 @@ func Upgrade(conf UpgradeConfig) error { return fmt.Errorf("failure while running upgrade: %w", err) } + // wait for the deletion of the scheduler pods to finish + if downgradeDeletionChan != nil { + select { + case <-downgradeDeletionChan: + case <-time.After(3 * time.Minute): + return errors.New("timed out waiting for downgrade deletion") + } + } + if dashboardChart != nil { if dashboardExists { if _, err = upgradeClient.Run(dashboardReleaseName, dashboardChart, vals); err != nil { @@ -201,6 +247,73 @@ func Upgrade(conf UpgradeConfig) error { return nil } +func deleteSchedulerPods(namespace string, currentVersion *semver.Version, targetVersion *semver.Version) error { + ctxWithTimeout, cancel := context.WithTimeout(context.Background(), time.Second*30) + defer cancel() + + var pods *core_v1.PodList + + // wait for at least one pod of the target version to be in the list before deleting the rest + // check the label app.kubernetes.io/version to determine the version of the pod + foundTargetVersion := false + for { + if foundTargetVersion { + break + } + k8sClient, err := Client() + if err != nil { + return err + } + + pods, err = k8sClient.CoreV1().Pods(namespace).List(ctxWithTimeout, meta_v1.ListOptions{ + LabelSelector: "app=dapr-scheduler-server", + }) + if err != nil && !errors.Is(err, context.DeadlineExceeded) { + return err + } + + if len(pods.Items) == 0 { + return nil + } + + for _, pod := range pods.Items { + pv, ok := pod.Labels["app.kubernetes.io/version"] + if ok { + podVersion, err := semver.NewVersion(pv) + if err == nil && podVersion.Equal(targetVersion) { + foundTargetVersion = true + break + } + } + } + time.Sleep(5 * time.Second) + } + + if pods == nil { + return errors.New("no scheduler pods found") + } + + // get a fresh client to ensure we have the latest state of the cluster + k8sClient, err := Client() + if err != nil { + return err + } + + // delete scheduler pods of the current version, i.e. >1.15.0 + for _, pod := range pods.Items { + if pv, ok := pod.Labels["app.kubernetes.io/version"]; ok { + podVersion, err := semver.NewVersion(pv) + if err == nil && podVersion.Equal(currentVersion) { + err = k8sClient.CoreV1().Pods(namespace).Delete(ctxWithTimeout, pod.Name, meta_v1.DeleteOptions{}) + if err != nil { + return fmt.Errorf("failed to delete pod %s during downgrade: %w", pod.Name, err) + } + } + } + } + return nil +} + // WithRetry enables retry with the specified max retries and retry interval. func WithRetry(maxRetries int, retryInterval time.Duration) UpgradeOption { return func(o *UpgradeOptions) { @@ -255,6 +368,11 @@ func highAvailabilityEnabled(status []StatusOutput) bool { if s.Name == "dapr-dashboard" { continue } + // Skip the scheduler server because it's in HA mode by default since version 1.15.0 + // This will fall back to other dapr services to determine if HA mode is enabled. + if strings.HasPrefix(s.Name, "dapr-scheduler-server") { + continue + } if s.Replicas > 1 { return true } diff --git a/pkg/kubernetes/upgrade_test.go b/pkg/kubernetes/upgrade_test.go index b56a5056..70e1a165 100644 --- a/pkg/kubernetes/upgrade_test.go +++ b/pkg/kubernetes/upgrade_test.go @@ -31,6 +31,38 @@ func TestHAMode(t *testing.T) { assert.True(t, r) }) + t.Run("ha mode with scheduler and other services", func(t *testing.T) { + s := []StatusOutput{ + { + Name: "dapr-scheduler-server", + Replicas: 3, + }, + { + Name: "dapr-placement-server", + Replicas: 3, + }, + } + + r := highAvailabilityEnabled(s) + assert.True(t, r) + }) + + t.Run("non-ha mode with only scheduler image variant", func(t *testing.T) { + s := []StatusOutput{ + { + Name: "dapr-scheduler-server-mariner", + Replicas: 3, + }, + { + Name: "dapr-placement-server-mariner", + Replicas: 3, + }, + } + + r := highAvailabilityEnabled(s) + assert.True(t, r) + }) + t.Run("non-ha mode", func(t *testing.T) { s := []StatusOutput{ { @@ -41,6 +73,46 @@ func TestHAMode(t *testing.T) { r := highAvailabilityEnabled(s) assert.False(t, r) }) + + t.Run("non-ha mode with scheduler and other services", func(t *testing.T) { + s := []StatusOutput{ + { + Name: "dapr-scheduler-server", + Replicas: 3, + }, + { + Name: "dapr-placement-server", + Replicas: 1, + }, + } + + r := highAvailabilityEnabled(s) + assert.False(t, r) + }) + + t.Run("non-ha mode with only scheduler", func(t *testing.T) { + s := []StatusOutput{ + { + Name: "dapr-scheduler-server", + Replicas: 3, + }, + } + + r := highAvailabilityEnabled(s) + assert.False(t, r) + }) + + t.Run("non-ha mode with only scheduler image variant", func(t *testing.T) { + s := []StatusOutput{ + { + Name: "dapr-scheduler-server-mariner", + Replicas: 3, + }, + } + + r := highAvailabilityEnabled(s) + assert.False(t, r) + }) } func TestMTLSChartValues(t *testing.T) { diff --git a/pkg/standalone/stop_windows.go b/pkg/standalone/stop_windows.go index b5d40ce3..dd6ed291 100644 --- a/pkg/standalone/stop_windows.go +++ b/pkg/standalone/stop_windows.go @@ -20,6 +20,7 @@ import ( "time" "github.com/dapr/cli/utils" + "github.com/kolesnikovae/go-winjob" "golang.org/x/sys/windows" ) diff --git a/pkg/syscall/syscall_windows.go b/pkg/syscall/syscall_windows.go index 90d93ae7..ecd19e66 100644 --- a/pkg/syscall/syscall_windows.go +++ b/pkg/syscall/syscall_windows.go @@ -26,6 +26,7 @@ import ( "golang.org/x/sys/windows" "github.com/dapr/cli/pkg/print" + "github.com/kolesnikovae/go-winjob" "github.com/kolesnikovae/go-winjob/jobapi" ) diff --git a/tests/e2e/common/common.go b/tests/e2e/common/common.go index 0f158f67..f40700a4 100644 --- a/tests/e2e/common/common.go +++ b/tests/e2e/common/common.go @@ -19,6 +19,7 @@ import ( "os" "path/filepath" "runtime" + "strconv" "strings" "testing" "time" @@ -56,6 +57,9 @@ const ( thirdPartyDevNamespace = "default" devRedisReleaseName = "dapr-dev-redis" devZipkinReleaseName = "dapr-dev-zipkin" + + DaprModeHA = "ha" + DaprModeNonHA = "non-ha" ) var ( @@ -82,6 +86,7 @@ type TestOptions struct { CheckResourceExists map[Resource]bool UninstallAll bool InitWithCustomCert bool + TimeoutSeconds int } type TestCase struct { @@ -120,6 +125,22 @@ func GetRuntimeVersion(t *testing.T, latest bool) *semver.Version { return runtimeVersion } +func GetDaprTestHaMode() string { + daprHaMode := os.Getenv("TEST_DAPR_HA_MODE") + if daprHaMode != "" { + return daprHaMode + } + return "" +} + +func ShouldSkipTest(mode string) bool { + envDaprHaMode := GetDaprTestHaMode() + if envDaprHaMode != "" { + return envDaprHaMode != mode + } + return false +} + func UpgradeTest(details VersionDetails, opts TestOptions) func(t *testing.T) { return func(t *testing.T) { daprPath := GetDaprPath() @@ -140,12 +161,18 @@ func UpgradeTest(details VersionDetails, opts TestOptions) func(t *testing.T) { args = append(args, "--image-variant", details.ImageVariant) } + if opts.TimeoutSeconds > 0 { + args = append(args, "--timeout", strconv.Itoa(opts.TimeoutSeconds)) + } + output, err := spawn.Command(daprPath, args...) t.Log(output) require.NoError(t, err, "upgrade failed") done := make(chan struct{}) + defer close(done) podsRunning := make(chan struct{}) + defer close(podsRunning) go waitAllPodsRunning(t, DaprTestNamespace, opts.HAEnabled, done, podsRunning, details) select { @@ -213,7 +240,7 @@ func GetTestsOnInstall(details VersionDetails, opts TestOptions) []TestCase { {"clusterroles exist " + details.RuntimeVersion, ClusterRolesTest(details, opts)}, {"clusterrolebindings exist " + details.RuntimeVersion, ClusterRoleBindingsTest(details, opts)}, {"apply and check components exist " + details.RuntimeVersion, ComponentsTestOnInstallUpgrade(opts)}, - {"apply and check httpendpoints exist " + details.RuntimeVersion, HTTPEndpointsTestOnInstallUpgrade(opts)}, + {"apply and check httpendpoints exist " + details.RuntimeVersion, HTTPEndpointsTestOnInstallUpgrade(opts, TestOptions{})}, {"check mtls " + details.RuntimeVersion, MTLSTestOnInstallUpgrade(opts)}, {"status check " + details.RuntimeVersion, StatusTestOnInstallUpgrade(details, opts)}, } @@ -348,10 +375,10 @@ func ComponentsTestOnInstallUpgrade(opts TestOptions) func(t *testing.T) { } } -func HTTPEndpointsTestOnInstallUpgrade(opts TestOptions) func(t *testing.T) { +func HTTPEndpointsTestOnInstallUpgrade(installOpts TestOptions, upgradeOpts TestOptions) func(t *testing.T) { return func(t *testing.T) { // if dapr is installed with httpendpoints. - if opts.ApplyHTTPEndpointChanges { + if installOpts.ApplyHTTPEndpointChanges { // apply any changes to the httpendpoint. t.Log("apply httpendpoint changes") output, err := spawn.Command("kubectl", "apply", "-f", "../testdata/namespace.yaml") @@ -360,12 +387,17 @@ func HTTPEndpointsTestOnInstallUpgrade(opts TestOptions) func(t *testing.T) { output, err = spawn.Command("kubectl", "apply", "-f", "../testdata/httpendpoint.yaml") t.Log(output) require.NoError(t, err, "expected no error on kubectl apply") - require.Equal(t, "httpendpoints.dapr.io/httpendpoint created\nhttpendpoints.dapr.io/httpendpoint created\n", output, "expected output to match") - httpEndpointOutputCheck(t, output) + + if installOpts.ApplyHTTPEndpointChanges && upgradeOpts.ApplyHTTPEndpointChanges { + require.Equal(t, "httpendpoint.dapr.io/httpendpoint unchanged\n", output, "expected output to match") + } else { + require.Equal(t, "httpendpoint.dapr.io/httpendpoint created\n", output, "expected output to match") + } t.Log("check applied httpendpoint exists") - _, err = spawn.Command("kubectl", "get", "httpendpoint") + output, err = spawn.Command("kubectl", "get", "httpendpoint") require.NoError(t, err, "expected no error on calling to retrieve httpendpoints") + httpEndpointOutputCheck(t, output) } } } @@ -375,6 +407,12 @@ func StatusTestOnInstallUpgrade(details VersionDetails, opts TestOptions) func(t daprPath := GetDaprPath() output, err := spawn.Command(daprPath, "status", "-k") require.NoError(t, err, "status check failed") + + version, err := semver.NewVersion(details.RuntimeVersion) + if err != nil { + t.Error("failed to parse runtime version", err) + } + var notFound map[string][]string if !opts.HAEnabled { notFound = map[string][]string{ @@ -384,6 +422,11 @@ func StatusTestOnInstallUpgrade(details VersionDetails, opts TestOptions) func(t "dapr-placement-server": {details.RuntimeVersion, "1"}, "dapr-operator": {details.RuntimeVersion, "1"}, } + if version.GreaterThanEqual(VersionWithHAScheduler) { + notFound["dapr-scheduler-server"] = []string{details.RuntimeVersion, "3"} + } else if version.GreaterThanEqual(VersionWithScheduler) { + notFound["dapr-scheduler-server"] = []string{details.RuntimeVersion, "1"} + } } else { notFound = map[string][]string{ "dapr-sentry": {details.RuntimeVersion, "3"}, @@ -392,6 +435,9 @@ func StatusTestOnInstallUpgrade(details VersionDetails, opts TestOptions) func(t "dapr-placement-server": {details.RuntimeVersion, "3"}, "dapr-operator": {details.RuntimeVersion, "3"}, } + if version.GreaterThanEqual(VersionWithScheduler) { + notFound["dapr-scheduler-server"] = []string{details.RuntimeVersion, "3"} + } } if details.ImageVariant != "" { @@ -399,6 +445,9 @@ func StatusTestOnInstallUpgrade(details VersionDetails, opts TestOptions) func(t notFound["dapr-sidecar-injector"][0] = notFound["dapr-sidecar-injector"][0] + "-" + details.ImageVariant notFound["dapr-placement-server"][0] = notFound["dapr-placement-server"][0] + "-" + details.ImageVariant notFound["dapr-operator"][0] = notFound["dapr-operator"][0] + "-" + details.ImageVariant + if notFound["dapr-scheduler-server"] != nil { + notFound["dapr-scheduler-server"][0] = notFound["dapr-scheduler-server"][0] + "-" + details.ImageVariant + } } lines := strings.Split(output, "\n")[1:] // remove header of status. @@ -407,13 +456,13 @@ func StatusTestOnInstallUpgrade(details VersionDetails, opts TestOptions) func(t cols := strings.Fields(strings.TrimSpace(line)) if len(cols) > 6 { // atleast 6 fields are verified from status (Age and created time are not). if toVerify, ok := notFound[cols[0]]; ok { // get by name. - require.Equal(t, DaprTestNamespace, cols[1], "namespace must match") - require.Equal(t, "True", cols[2], "healthly field must be true") - require.Equal(t, "Running", cols[3], "pods must be Running") - require.Equal(t, toVerify[1], cols[4], "replicas must be equal") + require.Equal(t, DaprTestNamespace, cols[1], "%s namespace must match", cols[0]) + require.Equal(t, "True", cols[2], "%s healthy field must be true", cols[0]) + require.Equal(t, "Running", cols[3], "%s pods must be Running", cols[0]) + require.Equal(t, toVerify[1], cols[4], "%s replicas must be equal", cols[0]) // TODO: Skip the dashboard version check for now until the helm chart is updated. if cols[0] != "dapr-dashboard" { - require.Equal(t, toVerify[0], cols[5], "versions must match") + require.Equal(t, toVerify[0], cols[5], "%s versions must match", cols[0]) } delete(notFound, cols[0]) } @@ -890,8 +939,11 @@ func uninstallTest(all bool, devEnabled bool) func(t *testing.T) { require.NoError(t, err, "uninstall failed") // wait for pods to be deleted completely. // needed to verify status checks fails correctly. - podsDeleted := make(chan struct{}) done := make(chan struct{}) + defer close(done) + podsDeleted := make(chan struct{}) + defer close(podsDeleted) + t.Log("waiting for pods to be deleted completely") go waitPodDeletion(t, done, podsDeleted) select { @@ -1026,7 +1078,7 @@ func componentOutputCheck(t *testing.T, opts TestOptions, output string) { return } - lines = strings.Split(output, "\n")[2:] // remove header and warning message. + lines = lines[2:] // remove header and warning message. if opts.DevEnabled { // default, test statestore. @@ -1194,6 +1246,8 @@ func waitPodDeletionDev(t *testing.T, done, podsDeleted chan struct{}) { devRedisReleaseName: "dapr-dev-redis-master-", devZipkinReleaseName: "dapr-dev-zipkin-", } + + t.Logf("dev pods waiting to be deleted: %d", len(list.Items)) for _, pod := range list.Items { t.Log(pod.ObjectMeta.Name) for component, prefix := range prefixes { @@ -1211,7 +1265,7 @@ func waitPodDeletionDev(t *testing.T, done, podsDeleted chan struct{}) { if len(found) == 2 { podsDeleted <- struct{}{} } - time.Sleep(15 * time.Second) + time.Sleep(10 * time.Second) } } @@ -1223,19 +1277,28 @@ func waitPodDeletion(t *testing.T, done, podsDeleted chan struct{}) { default: break } + ctx := context.Background() ctxt, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() + k8sClient, err := getClient() require.NoError(t, err, "error getting k8s client for pods check") + list, err := k8sClient.CoreV1().Pods(DaprTestNamespace).List(ctxt, v1.ListOptions{ Limit: 100, }) require.NoError(t, err, "error getting pods list from k8s") + if len(list.Items) == 0 { podsDeleted <- struct{}{} + } else { + t.Logf("pods waiting to be deleted: %d", len(list.Items)) + for _, pod := range list.Items { + t.Log(pod.ObjectMeta.Name) + } } - time.Sleep(15 * time.Second) + time.Sleep(5 * time.Second) } } @@ -1249,14 +1312,15 @@ func waitAllPodsRunning(t *testing.T, namespace string, haEnabled bool, done, po } ctx := context.Background() ctxt, cancel := context.WithTimeout(ctx, 10*time.Second) - defer cancel() + k8sClient, err := getClient() require.NoError(t, err, "error getting k8s client for pods check") list, err := k8sClient.CoreV1().Pods(namespace).List(ctxt, v1.ListOptions{ Limit: 100, }) require.NoError(t, err, "error getting pods list from k8s") - t.Logf("items %d", len(list.Items)) + + t.Logf("waiting for pods to be running, current count: %d", len(list.Items)) countOfReadyPods := 0 for _, item := range list.Items { t.Log(item.ObjectMeta.Name) @@ -1277,11 +1341,13 @@ func waitAllPodsRunning(t *testing.T, namespace string, haEnabled bool, done, po if err != nil { t.Error(err) } - if len(list.Items) == countOfReadyPods && ((haEnabled && countOfReadyPods == pods) || (!haEnabled && countOfReadyPods == pods)) { + if len(list.Items) == countOfReadyPods && countOfReadyPods == pods { podsRunning <- struct{}{} } - time.Sleep(15 * time.Second) + time.Sleep(5 * time.Second) + + cancel() } } diff --git a/tests/e2e/kubernetes/kubernetes_test.go b/tests/e2e/kubernetes/kubernetes_test.go index db551c9d..29bc41da 100644 --- a/tests/e2e/kubernetes/kubernetes_test.go +++ b/tests/e2e/kubernetes/kubernetes_test.go @@ -17,12 +17,17 @@ limitations under the License. package kubernetes_test import ( + "fmt" "testing" "github.com/dapr/cli/tests/e2e/common" ) func TestKubernetesNonHAModeMTLSDisabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -54,6 +59,10 @@ func TestKubernetesNonHAModeMTLSDisabled(t *testing.T) { } func TestKubernetesHAModeMTLSDisabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -85,6 +94,10 @@ func TestKubernetesHAModeMTLSDisabled(t *testing.T) { } func TestKubernetesDev(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -119,6 +132,10 @@ func TestKubernetesDev(t *testing.T) { } func TestKubernetesNonHAModeMTLSEnabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -150,6 +167,10 @@ func TestKubernetesNonHAModeMTLSEnabled(t *testing.T) { } func TestKubernetesHAModeMTLSEnabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -182,6 +203,10 @@ func TestKubernetesHAModeMTLSEnabled(t *testing.T) { } func TestKubernetesInitWithCustomCert(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -216,6 +241,10 @@ func TestKubernetesInitWithCustomCert(t *testing.T) { // Test for certificate renewal func TestRenewCertificateMTLSEnabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -254,6 +283,10 @@ func TestRenewCertificateMTLSEnabled(t *testing.T) { } func TestRenewCertificateMTLSDisabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -289,6 +322,10 @@ func TestRenewCertificateMTLSDisabled(t *testing.T) { } func TestRenewCertWithPrivateKey(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -331,6 +368,10 @@ func TestRenewCertWithPrivateKey(t *testing.T) { } func TestKubernetesUninstall(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -362,6 +403,10 @@ func TestKubernetesUninstall(t *testing.T) { } func TestRenewCertWithIncorrectFlags(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + common.EnsureUninstall(true, true) tests := []common.TestCase{} @@ -400,6 +445,10 @@ func TestRenewCertWithIncorrectFlags(t *testing.T) { // install dapr control plane with mariner docker images. // Renew the certificate of this control plane. func TestK8sInstallwithMarinerImagesAndRenewCertificate(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, false) @@ -438,6 +487,10 @@ func TestK8sInstallwithMarinerImagesAndRenewCertificate(t *testing.T) { } func TestKubernetesInstallwithoutRuntimeVersionFlag(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, true) @@ -470,6 +523,10 @@ func TestKubernetesInstallwithoutRuntimeVersionFlag(t *testing.T) { } func TestK8sInstallwithoutRuntimeVersionwithMarinerImagesFlag(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // ensure clean env for test ensureCleanEnv(t, true) diff --git a/tests/e2e/kubernetes/run_template_test.go b/tests/e2e/kubernetes/run_template_test.go index 5d050f4c..10dc27a1 100644 --- a/tests/e2e/kubernetes/run_template_test.go +++ b/tests/e2e/kubernetes/run_template_test.go @@ -47,6 +47,10 @@ var ( ) func TestKubernetesRunFile(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + ensureCleanEnv(t, false) // setup tests diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go index 3497cc98..3a9d8cb9 100644 --- a/tests/e2e/standalone/init_test.go +++ b/tests/e2e/standalone/init_test.go @@ -27,6 +27,7 @@ import ( "time" "github.com/Masterminds/semver" + "github.com/dapr/cli/pkg/version" "github.com/dapr/cli/tests/e2e/common" "github.com/dapr/cli/tests/e2e/spawn" "github.com/docker/docker/api/types" @@ -156,7 +157,11 @@ func TestStandaloneInit(t *testing.T) { daprPath := filepath.Join(homeDir, ".dapr") require.DirExists(t, daprPath, "Directory %s does not exist", daprPath) - latestDaprRuntimeVersion, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true) + latestDaprRuntimeVersion, err := version.GetDaprVersion() + require.NoError(t, err) + latestDaprDashboardVersion, err := version.GetDashboardVersion() + require.NoError(t, err) + verifyContainers(t, latestDaprRuntimeVersion) verifyBinaries(t, daprPath, latestDaprRuntimeVersion, latestDaprDashboardVersion) verifyConfigs(t, daprPath) @@ -222,7 +227,11 @@ func TestStandaloneInit(t *testing.T) { daprPath := filepath.Join(homeDir, ".dapr") require.DirExists(t, daprPath, "Directory %s does not exist", daprPath) - latestDaprRuntimeVersion, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true) + latestDaprRuntimeVersion, err := version.GetDaprVersion() + require.NoError(t, err) + latestDaprDashboardVersion, err := version.GetDashboardVersion() + require.NoError(t, err) + verifyContainers(t, latestDaprRuntimeVersion+"-mariner") verifyBinaries(t, daprPath, latestDaprRuntimeVersion, latestDaprDashboardVersion) verifyConfigs(t, daprPath) diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go index 0f5a8e0c..a5233774 100644 --- a/tests/e2e/upgrade/upgrade_test.go +++ b/tests/e2e/upgrade/upgrade_test.go @@ -33,48 +33,30 @@ var supportedUpgradePaths = []upgradePath{ { // test upgrade on mariner images. previous: common.VersionDetails{ - RuntimeVersion: "1.8.0", - DashboardVersion: "0.10.0", - ImageVariant: "mariner", - ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"}, - ClusterRoleBindings: []string{"dapr-operator", "dapr-role-tokenreview-binding", "dashboard-reader-global"}, - CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io"}, - }, - next: common.VersionDetails{ - RuntimeVersion: "1.8.7", - DashboardVersion: "0.10.0", - ImageVariant: "mariner", - ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"}, - ClusterRoleBindings: []string{"dapr-operator", "dapr-role-tokenreview-binding", "dashboard-reader-global"}, - CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io"}, - }, - }, - { - previous: common.VersionDetails{ - RuntimeVersion: "1.9.5", - DashboardVersion: "0.11.0", - ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"}, - ClusterRoleBindings: []string{"dapr-operator", "dapr-role-tokenreview-binding", "dashboard-reader-global"}, - CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io"}, - }, - next: common.VersionDetails{ - RuntimeVersion: "1.10.7", - DashboardVersion: "0.12.0", + RuntimeVersion: "1.14.4", + DashboardVersion: "0.15.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, - CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io"}, + CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, + }, + next: common.VersionDetails{ + RuntimeVersion: "1.15.2", + DashboardVersion: "0.15.0", + ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, + ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, + CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, }, }, { previous: common.VersionDetails{ - RuntimeVersion: "1.11.0", + RuntimeVersion: "1.13.6", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, }, next: common.VersionDetails{ - RuntimeVersion: "1.12.0", + RuntimeVersion: "1.14.4", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, @@ -83,14 +65,30 @@ var supportedUpgradePaths = []upgradePath{ }, { previous: common.VersionDetails{ - RuntimeVersion: "1.12.0", + RuntimeVersion: "1.13.6", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, }, next: common.VersionDetails{ - RuntimeVersion: "1.13.0-rc.2", + RuntimeVersion: "1.15.2", + DashboardVersion: "0.14.0", + ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, + ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, + CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, + }, + }, + { + previous: common.VersionDetails{ + RuntimeVersion: "1.14.4", + DashboardVersion: "0.14.0", + ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, + ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, + CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, + }, + next: common.VersionDetails{ + RuntimeVersion: "1.15.2", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, @@ -100,14 +98,14 @@ var supportedUpgradePaths = []upgradePath{ // test downgrade. { previous: common.VersionDetails{ - RuntimeVersion: "1.13.0-rc.2", + RuntimeVersion: "1.15.2", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, }, next: common.VersionDetails{ - RuntimeVersion: "1.12.0", + RuntimeVersion: "1.14.4", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, @@ -116,14 +114,30 @@ var supportedUpgradePaths = []upgradePath{ }, { previous: common.VersionDetails{ - RuntimeVersion: "1.12.0", + RuntimeVersion: "1.15.2", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, }, next: common.VersionDetails{ - RuntimeVersion: "1.11.0", + RuntimeVersion: "1.13.6", + DashboardVersion: "0.14.0", + ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, + ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, + CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, + }, + }, + { + previous: common.VersionDetails{ + RuntimeVersion: "1.14.4", + DashboardVersion: "0.14.0", + ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, + ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, + CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"}, + }, + next: common.VersionDetails{ + RuntimeVersion: "1.13.6", DashboardVersion: "0.14.0", ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"}, ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"}, @@ -146,7 +160,7 @@ func getTestsOnUpgrade(p upgradePath, installOpts, upgradeOpts common.TestOption {Name: "clusterroles exist " + details.RuntimeVersion, Callable: common.ClusterRolesTest(details, upgradeOpts)}, {Name: "clusterrolebindings exist " + details.RuntimeVersion, Callable: common.ClusterRoleBindingsTest(details, upgradeOpts)}, {Name: "previously applied components exist " + details.RuntimeVersion, Callable: common.ComponentsTestOnInstallUpgrade(upgradeOpts)}, - {Name: "previously applied http endpoints exist " + details.RuntimeVersion, Callable: common.HTTPEndpointsTestOnInstallUpgrade(upgradeOpts)}, + {Name: "previously applied http endpoints exist " + details.RuntimeVersion, Callable: common.HTTPEndpointsTestOnInstallUpgrade(installOpts, upgradeOpts)}, {Name: "check mtls " + details.RuntimeVersion, Callable: common.MTLSTestOnInstallUpgrade(upgradeOpts)}, {Name: "status check " + details.RuntimeVersion, Callable: common.StatusTestOnInstallUpgrade(details, upgradeOpts)}, }...) @@ -172,16 +186,19 @@ func getTestsOnUpgrade(p upgradePath, installOpts, upgradeOpts common.TestOption // Upgrade path tests. func TestUpgradePathNonHAModeMTLSDisabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // Ensure a clean environment. common.EnsureUninstall(false, false) // does not wait for pod deletion. + for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("setup v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { t.Run(deleteCRDs+p.previous.RuntimeVersion, common.DeleteCRD(p.previous.CustomResourceDefs)) t.Run(deleteCRDs+p.next.RuntimeVersion, common.DeleteCRD(p.next.CustomResourceDefs)) }) - } - for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { installOpts := common.TestOptions{ HAEnabled: false, @@ -206,6 +223,7 @@ func TestUpgradePathNonHAModeMTLSDisabled(t *testing.T) { common.ClusterRoles: true, common.ClusterRoleBindings: true, }, + TimeoutSeconds: 120, } tests := getTestsOnUpgrade(p, installOpts, upgradeOpts) @@ -217,16 +235,19 @@ func TestUpgradePathNonHAModeMTLSDisabled(t *testing.T) { } func TestUpgradePathNonHAModeMTLSEnabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeNonHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeNonHA)) + } + // Ensure a clean environment. common.EnsureUninstall(false, false) // does not wait for pod deletion. + for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("setup v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { t.Run(deleteCRDs+p.previous.RuntimeVersion, common.DeleteCRD(p.previous.CustomResourceDefs)) t.Run(deleteCRDs+p.next.RuntimeVersion, common.DeleteCRD(p.next.CustomResourceDefs)) }) - } - for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { installOpts := common.TestOptions{ HAEnabled: false, @@ -251,6 +272,7 @@ func TestUpgradePathNonHAModeMTLSEnabled(t *testing.T) { common.ClusterRoles: true, common.ClusterRoleBindings: true, }, + TimeoutSeconds: 120, } tests := getTestsOnUpgrade(p, installOpts, upgradeOpts) @@ -262,16 +284,18 @@ func TestUpgradePathNonHAModeMTLSEnabled(t *testing.T) { } func TestUpgradePathHAModeMTLSDisabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeHA)) + } + // Ensure a clean environment. common.EnsureUninstall(false, false) // does not wait for pod deletion. + for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("setup v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { t.Run(deleteCRDs+p.previous.RuntimeVersion, common.DeleteCRD(p.previous.CustomResourceDefs)) t.Run(deleteCRDs+p.next.RuntimeVersion, common.DeleteCRD(p.next.CustomResourceDefs)) }) - } - - for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { installOpts := common.TestOptions{ HAEnabled: true, @@ -296,6 +320,7 @@ func TestUpgradePathHAModeMTLSDisabled(t *testing.T) { common.ClusterRoles: true, common.ClusterRoleBindings: true, }, + TimeoutSeconds: 120, } tests := getTestsOnUpgrade(p, installOpts, upgradeOpts) @@ -307,16 +332,19 @@ func TestUpgradePathHAModeMTLSDisabled(t *testing.T) { } func TestUpgradePathHAModeMTLSEnabled(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeHA)) + } + // Ensure a clean environment. common.EnsureUninstall(false, false) // does not wait for pod deletion. + for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("setup v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { t.Run(deleteCRDs+p.previous.RuntimeVersion, common.DeleteCRD(p.previous.CustomResourceDefs)) t.Run(deleteCRDs+p.next.RuntimeVersion, common.DeleteCRD(p.next.CustomResourceDefs)) }) - } - for _, p := range supportedUpgradePaths { t.Run(fmt.Sprintf("v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { installOpts := common.TestOptions{ HAEnabled: true, @@ -341,6 +369,7 @@ func TestUpgradePathHAModeMTLSEnabled(t *testing.T) { common.ClusterRoles: true, common.ClusterRoleBindings: true, }, + TimeoutSeconds: 120, } tests := getTestsOnUpgrade(p, installOpts, upgradeOpts) @@ -354,14 +383,12 @@ func TestUpgradePathHAModeMTLSEnabled(t *testing.T) { // HTTPEndpoint Dapr resource is a new type as of v1.11. // This test verifies install/upgrade functionality with this additional resource. func TestUpgradeWithHTTPEndpoint(t *testing.T) { + if common.ShouldSkipTest(common.DaprModeHA) { + t.Skip(fmt.Sprintf("Skipping %s mode test", common.DaprModeHA)) + } + // Ensure a clean environment. common.EnsureUninstall(false, false) // does not wait for pod deletion. - for _, p := range supportedUpgradePaths { - t.Run(fmt.Sprintf("setup v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { - t.Run(deleteCRDs+p.previous.RuntimeVersion, common.DeleteCRD(p.previous.CustomResourceDefs)) - t.Run(deleteCRDs+p.next.RuntimeVersion, common.DeleteCRD(p.next.CustomResourceDefs)) - }) - } for _, p := range supportedUpgradePaths { ver, err := semver.NewVersion(p.previous.RuntimeVersion) @@ -373,11 +400,17 @@ func TestUpgradeWithHTTPEndpoint(t *testing.T) { if ver.Major() != 1 || ver.Minor() < 11 { return } + + t.Run(fmt.Sprintf("setup v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { + t.Run(deleteCRDs+p.previous.RuntimeVersion, common.DeleteCRD(p.previous.CustomResourceDefs)) + t.Run(deleteCRDs+p.next.RuntimeVersion, common.DeleteCRD(p.next.CustomResourceDefs)) + }) + t.Run(fmt.Sprintf("v%s to v%s", p.previous.RuntimeVersion, p.next.RuntimeVersion), func(t *testing.T) { installOpts := common.TestOptions{ HAEnabled: true, MTLSEnabled: true, - ApplyComponentChanges: false, + ApplyComponentChanges: true, ApplyHTTPEndpointChanges: true, CheckResourceExists: map[common.Resource]bool{ common.CustomResourceDefs: true, @@ -397,6 +430,7 @@ func TestUpgradeWithHTTPEndpoint(t *testing.T) { common.ClusterRoles: true, common.ClusterRoleBindings: true, }, + TimeoutSeconds: 120, } tests := getTestsOnUpgrade(p, installOpts, upgradeOpts)