From 678b4177e69772a505f1940c26296f3d6795a17c Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:22:43 -0500
Subject: [PATCH 01/28] Scheduler: change /var/lock to /run/lock
Change the data directory from `/var/lock` to `/run/lock` so that the
scheduler data directory also works for mariner based images.
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index bc7fba008..7144b795c 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -649,10 +649,10 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
// If that directory didn't exist in the container previously, then Docker sets
// the permissions owned by root and not writeable.
// We are lucky in that the Dapr containers have a world writeable directory at
- // /var/lock and can therefore mount the Docker volume here.
+ // /run/lock and can therefore mount the Docker volume here.
// TODO: update the Dapr scheduler dockerfile to create a scheduler user id writeable
// directory at /var/lib/dapr/scheduler, then update the path here.
- args = append(args, "--volume", *info.schedulerVolume+":/var/lock")
+ args = append(args, "--volume", *info.schedulerVolume+":/run/lock")
}
if info.dockerNetwork != "" {
@@ -673,7 +673,7 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
)
}
- args = append(args, image, "--etcd-data-dir=/var/lock/dapr/scheduler")
+ args = append(args, image, "--etcd-data-dir=/run/lock/dapr/scheduler")
_, err = utils.RunCmdAndWait(runtimeCmd, args...)
if err != nil {
From 6654a5ea5989c8179591a9fd381714a2b57f67f0 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:36:15 -0500
Subject: [PATCH 02/28] Update dapr in standalone tests to 1.14.1
Signed-off-by: joshvanl
---
tests/e2e/standalone/init_test.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go
index e07b405a6..bb9fe7836 100644
--- a/tests/e2e/standalone/init_test.go
+++ b/tests/e2e/standalone/init_test.go
@@ -175,7 +175,7 @@ func TestStandaloneInit(t *testing.T) {
must(t, cmdUninstall, "failed to uninstall Dapr")
args := []string{
- "--runtime-version", "1.14.0-rc.3",
+ "--runtime-version", "1.14.1",
"--dev",
}
output, err := cmdInit(args...)
@@ -190,8 +190,8 @@ func TestStandaloneInit(t *testing.T) {
require.DirExists(t, daprPath, "Directory %s does not exist", daprPath)
_, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true)
- verifyContainers(t, "1.14.0-rc.3")
- verifyBinaries(t, daprPath, "1.14.0-rc.3", latestDaprDashboardVersion)
+ verifyContainers(t, "1.14.1"),
+ verifyBinaries(t, daprPath, "1.14.1", latestDaprDashboardVersion)
verifyConfigs(t, daprPath)
placementPort := 50005
From 0dea2d00c2e3fb5aa6c9cfc9a5b40bb1448ae5a9 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:36:58 -0500
Subject: [PATCH 03/28] Update dapr in github workflow to 1.14.1
Signed-off-by: joshvanl
---
.github/workflows/kind_e2e.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/kind_e2e.yaml b/.github/workflows/kind_e2e.yaml
index af559b29a..43069fe5b 100644
--- a/.github/workflows/kind_e2e.yaml
+++ b/.github/workflows/kind_e2e.yaml
@@ -50,11 +50,11 @@ jobs:
name: E2E tests for K8s (KinD)
runs-on: ubuntu-latest
env:
- DAPR_RUNTIME_PINNED_VERSION: 1.13.0-rc.2
+ DAPR_RUNTIME_PINNED_VERSION: 1.14.1
DAPR_DASHBOARD_PINNED_VERSION: 0.14.0
DAPR_RUNTIME_LATEST_STABLE_VERSION:
DAPR_DASHBOARD_LATEST_STABLE_VERSION:
- DAPR_TGZ: dapr-1.13.0-rc.2.tgz
+ DAPR_TGZ: dapr-1.14.1.tgz
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
From 019e6a7dcb714457b82cd9e6bc15ef0cac4b626e Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:40:02 -0500
Subject: [PATCH 04/28] Adds scheduler upgrade and downgread tests
Signed-off-by: joshvanl
---
.github/workflows/self_hosted_e2e.yaml | 2 +-
tests/e2e/upgrade/upgrade_test.go | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/self_hosted_e2e.yaml b/.github/workflows/self_hosted_e2e.yaml
index c8c0441ba..7dc8f0c74 100644
--- a/.github/workflows/self_hosted_e2e.yaml
+++ b/.github/workflows/self_hosted_e2e.yaml
@@ -38,7 +38,7 @@ jobs:
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org
ARCHIVE_OUTDIR: dist/archives
- DAPR_RUNTIME_PINNED_VERSION: "1.13.0-rc.2"
+ DAPR_RUNTIME_PINNED_VERSION: "1.14.1"
DAPR_DASHBOARD_PINNED_VERSION: 0.14.0
DAPR_RUNTIME_LATEST_STABLE_VERSION: ""
DAPR_DASHBOARD_LATEST_STABLE_VERSION: ""
diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go
index 0f5a8e0c7..da0133968 100644
--- a/tests/e2e/upgrade/upgrade_test.go
+++ b/tests/e2e/upgrade/upgrade_test.go
@@ -100,14 +100,14 @@ var supportedUpgradePaths = []upgradePath{
// test downgrade.
{
previous: common.VersionDetails{
- RuntimeVersion: "1.13.0-rc.2",
+ RuntimeVersion: "1.14.1",
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"},
+ ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
+ ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
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.13.0",
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,17 +116,17 @@ var supportedUpgradePaths = []upgradePath{
},
{
previous: common.VersionDetails{
- RuntimeVersion: "1.12.0",
+ RuntimeVersion: "1.13.0",
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.14.1",
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"},
+ ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
+ ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"},
},
},
From 343d11120ec1054e09e6f8f6e61077d5f5016102 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:41:57 -0500
Subject: [PATCH 05/28] Adds back missing tests
Signed-off-by: joshvanl
---
tests/e2e/upgrade/upgrade_test.go | 32 +++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go
index da0133968..68f2d0ffd 100644
--- a/tests/e2e/upgrade/upgrade_test.go
+++ b/tests/e2e/upgrade/upgrade_test.go
@@ -98,6 +98,38 @@ var supportedUpgradePaths = []upgradePath{
},
},
// test downgrade.
+ {
+ previous: common.VersionDetails{
+ RuntimeVersion: "1.13.0-rc.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",
+ 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.12.0",
+ 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",
+ 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.1",
From c20e588173da2c67a75ca1fc11f2502d3615aac7 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:44:28 -0500
Subject: [PATCH 06/28] Fix comma in test code
Signed-off-by: joshvanl
---
tests/e2e/standalone/init_test.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go
index bb9fe7836..21df7079d 100644
--- a/tests/e2e/standalone/init_test.go
+++ b/tests/e2e/standalone/init_test.go
@@ -167,7 +167,7 @@ func TestStandaloneInit(t *testing.T) {
placementPort = 6050
}
- verifyTCPLocalhost(t, placementPort)
+ verifyTCPLocalhost(t, placementPort)
})
t.Run("init version with scheduler", func(t *testing.T) {
@@ -190,7 +190,7 @@ func TestStandaloneInit(t *testing.T) {
require.DirExists(t, daprPath, "Directory %s does not exist", daprPath)
_, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true)
- verifyContainers(t, "1.14.1"),
+ verifyContainers(t, "1.14.1")
verifyBinaries(t, daprPath, "1.14.1", latestDaprDashboardVersion)
verifyConfigs(t, daprPath)
@@ -201,8 +201,8 @@ func TestStandaloneInit(t *testing.T) {
schedulerPort = 6060
}
- verifyTCPLocalhost(t, placementPort)
- verifyTCPLocalhost(t, schedulerPort)
+ verifyTCPLocalhost(t, placementPort)
+ verifyTCPLocalhost(t, schedulerPort)
})
t.Run("init without runtime-version flag with mariner images", func(t *testing.T) {
From c938c5592c38877c41ea46ee8e9d7e3c84cb9f7a Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Thu, 15 Aug 2024 17:55:06 -0500
Subject: [PATCH 07/28] Fix string match
Signed-off-by: joshvanl
---
tests/e2e/standalone/run_test.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/e2e/standalone/run_test.go b/tests/e2e/standalone/run_test.go
index 934f4fd0c..e8caa40a8 100644
--- a/tests/e2e/standalone/run_test.go
+++ b/tests/e2e/standalone/run_test.go
@@ -54,7 +54,7 @@ func TestStandaloneRun(t *testing.T) {
output, err := cmdRun(path, "--dapr-internal-grpc-port", "9999", "--", "bash", "-c", "echo test")
t.Log(output)
require.NoError(t, err, "run failed")
- assert.Contains(t, output, "Internal gRPC server is running on port 9999")
+ assert.Contains(t, output, "Internal gRPC server is running on port :9999")
assert.Contains(t, output, "Exited App successfully")
assert.Contains(t, output, "Exited Dapr successfully")
assert.NotContains(t, output, "Could not update sidecar metadata for cliPID")
From 822190c29703d546d2018cf14138012f9b4845be Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 08:59:05 -0500
Subject: [PATCH 08/28] Fix string match in standalone e2e test
Signed-off-by: joshvanl
---
tests/e2e/standalone/run_test.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/e2e/standalone/run_test.go b/tests/e2e/standalone/run_test.go
index e8caa40a8..e073ab897 100644
--- a/tests/e2e/standalone/run_test.go
+++ b/tests/e2e/standalone/run_test.go
@@ -54,7 +54,7 @@ func TestStandaloneRun(t *testing.T) {
output, err := cmdRun(path, "--dapr-internal-grpc-port", "9999", "--", "bash", "-c", "echo test")
t.Log(output)
require.NoError(t, err, "run failed")
- assert.Contains(t, output, "Internal gRPC server is running on port :9999")
+ assert.Contains(t, output, "Internal gRPC server is running on :9999")
assert.Contains(t, output, "Exited App successfully")
assert.Contains(t, output, "Exited Dapr successfully")
assert.NotContains(t, output, "Could not update sidecar metadata for cliPID")
From cff312d943ad162825035f72daa2a83d6a5d4c68 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 09:37:28 -0500
Subject: [PATCH 09/28] Increase e2e timeout
Signed-off-by: joshvanl
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 298c35d2d..e6a850c2b 100644
--- a/Makefile
+++ b/Makefile
@@ -154,14 +154,14 @@ test: test-deps
################################################################################
.PHONY: test-e2e-k8s
test-e2e-k8s: test-deps
- gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 25m -count=1 -tags=e2e ./tests/e2e/kubernetes/...
+ gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 35m -count=1 -tags=e2e ./tests/e2e/kubernetes/...
################################################################################
# E2E Tests for K8s Template exec #
################################################################################
.PHONY: test-e2e-k8s-template
test-e2e-k8s-template: test-deps
- gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 25m -count=1 -tags=templatek8s ./tests/e2e/kubernetes/...
+ gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 35m -count=1 -tags=templatek8s ./tests/e2e/kubernetes/...
################################################################################
# Build, E2E Tests for Kubernetes #
From dbd961d5c899045b8aa4ff671135cd1f1bad991a Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 10:09:58 -0500
Subject: [PATCH 10/28] Assert directory does not exist
Signed-off-by: joshvanl
---
tests/e2e/common/common.go | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/e2e/common/common.go b/tests/e2e/common/common.go
index e52412944..faecc9a3f 100644
--- a/tests/e2e/common/common.go
+++ b/tests/e2e/common/common.go
@@ -271,10 +271,7 @@ func MTLSTestOnInstallUpgrade(opts TestOptions) func(t *testing.T) {
// export
// check that the dir does not exist now.
- _, err = os.Stat("./certs")
- if assert.Error(t, err) {
- assert.True(t, os.IsNotExist(err), err.Error())
- }
+ assert.NoDirExists(t, "./certs")
output, err = spawn.Command(daprPath, "mtls", "export", "-o", "./certs")
require.NoError(t, err, "expected no error on mtls export")
From 553f52229fbd83e23feb6c9fa09d6ab2bc962575 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 10:10:46 -0500
Subject: [PATCH 11/28] Remove old upgrade test versions
Signed-off-by: joshvanl
---
tests/e2e/upgrade/upgrade_test.go | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go
index 68f2d0ffd..df5f13c0c 100644
--- a/tests/e2e/upgrade/upgrade_test.go
+++ b/tests/e2e/upgrade/upgrade_test.go
@@ -33,7 +33,7 @@ var supportedUpgradePaths = []upgradePath{
{
// test upgrade on mariner images.
previous: common.VersionDetails{
- RuntimeVersion: "1.8.0",
+ RuntimeVersion: "1.13.0",
DashboardVersion: "0.10.0",
ImageVariant: "mariner",
ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"},
@@ -41,7 +41,7 @@ var supportedUpgradePaths = []upgradePath{
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io"},
},
next: common.VersionDetails{
- RuntimeVersion: "1.8.7",
+ RuntimeVersion: "1.14.1",
DashboardVersion: "0.10.0",
ImageVariant: "mariner",
ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"},
@@ -49,22 +49,6 @@ var supportedUpgradePaths = []upgradePath{
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",
- 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"},
- },
- },
{
previous: common.VersionDetails{
RuntimeVersion: "1.11.0",
From 4014bb3b230361c24ffafbb36928843c169996dc Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 11:22:07 -0500
Subject: [PATCH 12/28] increase timeout
Signed-off-by: joshvanl
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index e6a850c2b..93b2d1f30 100644
--- a/Makefile
+++ b/Makefile
@@ -154,14 +154,14 @@ test: test-deps
################################################################################
.PHONY: test-e2e-k8s
test-e2e-k8s: test-deps
- gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 35m -count=1 -tags=e2e ./tests/e2e/kubernetes/...
+ gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 40m -count=1 -tags=e2e ./tests/e2e/kubernetes/...
################################################################################
# E2E Tests for K8s Template exec #
################################################################################
.PHONY: test-e2e-k8s-template
test-e2e-k8s-template: test-deps
- gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 35m -count=1 -tags=templatek8s ./tests/e2e/kubernetes/...
+ gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 40m -count=1 -tags=templatek8s ./tests/e2e/kubernetes/...
################################################################################
# Build, E2E Tests for Kubernetes #
From e601f436e1ffabb3a99d6ca55d15b24dde816857 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 11:31:42 -0500
Subject: [PATCH 13/28] Adds container logs command for scheduler fail
Signed-off-by: joshvanl
---
tests/e2e/standalone/utils.go | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/e2e/standalone/utils.go b/tests/e2e/standalone/utils.go
index 87d2fa78c..b0b79e823 100644
--- a/tests/e2e/standalone/utils.go
+++ b/tests/e2e/standalone/utils.go
@@ -18,6 +18,9 @@ package standalone_test
import (
"bufio"
+ "context"
+ "fmt"
+ "io"
"os"
"os/exec"
"path/filepath"
@@ -25,6 +28,8 @@ import (
"strings"
"testing"
+ "github.com/docker/docker/api/types"
+ dockerClient "github.com/docker/docker/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -137,6 +142,15 @@ func ensureDaprInstallation(t *testing.T) {
"--dashboard-version", daprDashboardVersion,
}
output, err := cmdInit(args...)
+ if err != nil {
+ cli, err := dockerClient.NewClientWithOpts(dockerClient.FromEnv)
+ require.NoError(t, err)
+ reader, err := cli.ContainerLogs(context.Background(), "dapr_scheduler", types.ContainerLogsOptions{ShowStdout: true, ShowStderr: true})
+ require.NoError(t, err)
+ b, err := io.ReadAll(reader)
+ require.NoError(t, err)
+ fmt.Printf(">>%s\n", b)
+ }
require.NoError(t, err, "failed to install dapr:%v", output)
} else if err != nil {
// Some other error occurred.
From f778633b03b895b3d508a5bc0b6b9c7696398209 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 11:50:11 -0500
Subject: [PATCH 14/28] Change data path based image variant
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index 7144b795c..9d24a25b5 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -642,6 +642,10 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
"-d",
"--entrypoint", "./scheduler",
}
+ schedVolPath := "/var/lock"
+ if info.imageVariant == "mariner" {
+ schedVolPath = "/run/lock"
+ }
if info.schedulerVolume != nil {
// Don't touch this file location unless things start breaking.
// In Docker, when Docker creates a volume and mounts that volume. Docker
@@ -652,7 +656,7 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
// /run/lock and can therefore mount the Docker volume here.
// TODO: update the Dapr scheduler dockerfile to create a scheduler user id writeable
// directory at /var/lib/dapr/scheduler, then update the path here.
- args = append(args, "--volume", *info.schedulerVolume+":/run/lock")
+ args = append(args, "--volume", *info.schedulerVolume+":"+schedVolPath)
}
if info.dockerNetwork != "" {
@@ -673,7 +677,7 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
)
}
- args = append(args, image, "--etcd-data-dir=/run/lock/dapr/scheduler")
+ args = append(args, image, "--etcd-data-dir="+schedVolPath+"/dapr/scheduler")
_, err = utils.RunCmdAndWait(runtimeCmd, args...)
if err != nil {
From 02816062ed8ff36fd4a373b56dba5535fb96d3ad Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 11:51:23 -0500
Subject: [PATCH 15/28] Increase 30m to 45m timeout in workflow
Signed-off-by: joshvanl
---
.github/workflows/self_hosted_e2e.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/self_hosted_e2e.yaml b/.github/workflows/self_hosted_e2e.yaml
index 7dc8f0c74..4188ce421 100644
--- a/.github/workflows/self_hosted_e2e.yaml
+++ b/.github/workflows/self_hosted_e2e.yaml
@@ -159,7 +159,7 @@ jobs:
shell: bash
- name: Set the test timeout - MacOS
if: matrix.os == 'macos-latest-large'
- run: echo "E2E_SH_TEST_TIMEOUT=30m" >> $GITHUB_ENV
+ run: echo "E2E_SH_TEST_TIMEOUT=40m" >> $GITHUB_ENV
- name: Run E2E tests with GHCR
# runs every 6hrs
if: github.event.schedule == '0 */6 * * *'
From a16889043093190fb68f8deda6deecd66fbdd15f Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 11:57:52 -0500
Subject: [PATCH 16/28] Remove another old test
Signed-off-by: joshvanl
---
tests/e2e/upgrade/upgrade_test.go | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go
index df5f13c0c..d6cf505d3 100644
--- a/tests/e2e/upgrade/upgrade_test.go
+++ b/tests/e2e/upgrade/upgrade_test.go
@@ -49,22 +49,6 @@ var supportedUpgradePaths = []upgradePath{
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io"},
},
},
- {
- previous: common.VersionDetails{
- RuntimeVersion: "1.11.0",
- 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",
- 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.12.0",
From fb41c2e0f3a7d1f4ef42ae82a5f8e55ac650dcf6 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 13:01:19 -0500
Subject: [PATCH 17/28] Remove testing container logs
Signed-off-by: joshvanl
---
tests/e2e/standalone/utils.go | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/tests/e2e/standalone/utils.go b/tests/e2e/standalone/utils.go
index b0b79e823..87d2fa78c 100644
--- a/tests/e2e/standalone/utils.go
+++ b/tests/e2e/standalone/utils.go
@@ -18,9 +18,6 @@ package standalone_test
import (
"bufio"
- "context"
- "fmt"
- "io"
"os"
"os/exec"
"path/filepath"
@@ -28,8 +25,6 @@ import (
"strings"
"testing"
- "github.com/docker/docker/api/types"
- dockerClient "github.com/docker/docker/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -142,15 +137,6 @@ func ensureDaprInstallation(t *testing.T) {
"--dashboard-version", daprDashboardVersion,
}
output, err := cmdInit(args...)
- if err != nil {
- cli, err := dockerClient.NewClientWithOpts(dockerClient.FromEnv)
- require.NoError(t, err)
- reader, err := cli.ContainerLogs(context.Background(), "dapr_scheduler", types.ContainerLogsOptions{ShowStdout: true, ShowStderr: true})
- require.NoError(t, err)
- b, err := io.ReadAll(reader)
- require.NoError(t, err)
- fmt.Printf(">>%s\n", b)
- }
require.NoError(t, err, "failed to install dapr:%v", output)
} else if err != nil {
// Some other error occurred.
From bd413b1fd9c7f6cda2c319c538707541d9a7836a Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Fri, 16 Aug 2024 16:26:37 -0500
Subject: [PATCH 18/28] Use correct names for RBAC resources
Signed-off-by: joshvanl
---
tests/e2e/upgrade/upgrade_test.go | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go
index d6cf505d3..8de45110e 100644
--- a/tests/e2e/upgrade/upgrade_test.go
+++ b/tests/e2e/upgrade/upgrade_test.go
@@ -36,17 +36,17 @@ var supportedUpgradePaths = []upgradePath{
RuntimeVersion: "1.13.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"},
+ 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.14.1",
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"},
+ 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"},
},
},
{
From 8353f3fa9c1c66bed8803efe859f935b944d6bf6 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Sat, 17 Aug 2024 02:29:25 -0500
Subject: [PATCH 19/28] Adds dapr_scheduler log output
Signed-off-by: joshvanl
---
tests/e2e/standalone/init_test.go | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go
index 21df7079d..20021b564 100644
--- a/tests/e2e/standalone/init_test.go
+++ b/tests/e2e/standalone/init_test.go
@@ -18,6 +18,7 @@ package standalone_test
import (
"context"
+ "fmt"
"net"
"os"
"path/filepath"
@@ -213,6 +214,17 @@ func TestStandaloneInit(t *testing.T) {
}
output, err := cmdInit(args...)
t.Log(output)
+
+ cli, err := dockerClient.NewClientWithOpts(dockerClient.FromEnv)
+ require.NoError(t, err)
+
+ b, err := cli.ContainerLogs(context.Background(), "dapr_scheduler", types.ContainerLogsOptions{
+ ShowStdout: true,
+ ShowStderr: true,
+ })
+ require.NoError(t, err)
+ fmt.Printf(">>%s\n", b)
+
require.NoError(t, err, "init failed")
assert.Contains(t, output, "Success! Dapr is up and running.")
From 7742891949e3136bed4ffdcb404eb89886573a00 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 09:41:39 -0500
Subject: [PATCH 20/28] Read all logs
Signed-off-by: joshvanl
---
tests/e2e/standalone/init_test.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go
index 20021b564..b4f8e804c 100644
--- a/tests/e2e/standalone/init_test.go
+++ b/tests/e2e/standalone/init_test.go
@@ -19,6 +19,7 @@ package standalone_test
import (
"context"
"fmt"
+ "io"
"net"
"os"
"path/filepath"
@@ -223,7 +224,9 @@ func TestStandaloneInit(t *testing.T) {
ShowStderr: true,
})
require.NoError(t, err)
- fmt.Printf(">>%s\n", b)
+ logs, err := io.ReadAll(b)
+ require.NoError(t, err)
+ fmt.Printf(">>%s\n", logs)
require.NoError(t, err, "init failed")
assert.Contains(t, output, "Success! Dapr is up and running.")
From 389f8367d496fac36f5a3cc633240527f370695b Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 09:59:37 -0500
Subject: [PATCH 21/28] Only use var lock if in windows
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index 9d24a25b5..6f2e3beea 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -25,6 +25,7 @@ import (
"net/http"
"os"
"path"
+ "path/filepath"
path_filepath "path/filepath"
"runtime"
"strings"
@@ -642,9 +643,9 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
"-d",
"--entrypoint", "./scheduler",
}
- schedVolPath := "/var/lock"
- if info.imageVariant == "mariner" {
- schedVolPath = "/run/lock"
+ schedVolPath := filepath.Join("var", "lock")
+ if info.imageVariant == "mariner" && runtime.GOOS == daprWindowsOS {
+ schedVolPath = filepath.Join("run", "lock")
}
if info.schedulerVolume != nil {
// Don't touch this file location unless things start breaking.
From 4c26cb648c0c7438e5492776cd0f186d6eac2119 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 10:11:00 -0500
Subject: [PATCH 22/28] Linting
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 48 ++++++++++++++++++------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index 6f2e3beea..4e58187b7 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -230,7 +230,7 @@ func Init(runtimeVersion, dashboardVersion string, dockerNetwork string, slimMod
// If --from-dir flag is given try parsing the details from the expected details file in the specified directory.
if isAirGapInit {
bundleDet = bundleDetails{}
- detailsFilePath := path_filepath.Join(fromDir, bundleDetailsFileName)
+ detailsFilePath := filepath.Join(fromDir, bundleDetailsFileName)
err = bundleDet.readAndParseDetails(detailsFilePath)
if err != nil {
return fmt.Errorf("error parsing details file from bundle location: %w", err)
@@ -525,7 +525,7 @@ func runPlacementService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
if isAirGapInit {
// if --from-dir flag is given load the image details from the installer-bundle.
- dir := path_filepath.Join(info.fromDir, *info.bundleDet.ImageSubDir)
+ dir := filepath.Join(info.fromDir, *info.bundleDet.ImageSubDir)
image = info.bundleDet.getDaprImageName()
err = loadContainer(dir, info.bundleDet.getDaprImageFileName(), info.containerRuntime)
if err != nil {
@@ -620,7 +620,7 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
if isAirGapInit {
// if --from-dir flag is given load the image details from the installer-bundle.
- dir := path_filepath.Join(info.fromDir, *info.bundleDet.ImageSubDir)
+ dir := filepath.Join(info.fromDir, *info.bundleDet.ImageSubDir)
image = info.bundleDet.getDaprImageName()
err = loadContainer(dir, info.bundleDet.getDaprImageFileName(), info.containerRuntime)
if err != nil {
@@ -695,8 +695,8 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
func moveDashboardFiles(extractedFilePath string, dir string) (string, error) {
// Move /release/os/web directory to /web.
- oldPath := path_filepath.Join(path_filepath.Dir(extractedFilePath), "web")
- newPath := path_filepath.Join(dir, "web")
+ oldPath := filepath.Join(filepath.Dir(extractedFilePath), "web")
+ newPath := filepath.Join(dir, "web")
err := os.Rename(oldPath, newPath)
if err != nil {
err = fmt.Errorf("failed to move dashboard files: %w", err)
@@ -704,17 +704,17 @@ func moveDashboardFiles(extractedFilePath string, dir string) (string, error) {
}
// Move binary from /release//web/dashboard(.exe) to /dashboard(.exe).
- err = os.Rename(extractedFilePath, path_filepath.Join(dir, path_filepath.Base(extractedFilePath)))
+ err = os.Rename(extractedFilePath, filepath.Join(dir, path_filepath.Base(extractedFilePath)))
if err != nil {
- err = fmt.Errorf("error moving %s binary to path: %w", path_filepath.Base(extractedFilePath), err)
+ err = fmt.Errorf("error moving %s binary to path: %w", filepath.Base(extractedFilePath), err)
return "", err
}
// Change the extracted binary file path to reflect the move above.
- extractedFilePath = path_filepath.Join(dir, path_filepath.Base(extractedFilePath))
+ extractedFilePath = filepath.Join(dir, path_filepath.Base(extractedFilePath))
// Remove the now-empty 'release' directory.
- err = os.RemoveAll(path_filepath.Join(dir, "release"))
+ err = os.RemoveAll(filepath.Join(dir, "release"))
if err != nil {
err = fmt.Errorf("error moving dashboard files: %w", err)
return "", err
@@ -782,28 +782,28 @@ func installScheduler(wg *sync.WaitGroup, errorChan chan<- error, info initInfo)
// installBinary installs the daprd, placement, scheduler, or dashboard binaries and associated files inside the default dapr bin directory.
func installBinary(version, binaryFilePrefix, githubRepo string, info initInfo) error {
var (
- err error
- filepath string
+ err error
+ path string
)
dir := getDaprBinPath(info.installDir)
if isAirGapInit {
- filepath = path_filepath.Join(info.fromDir, *info.bundleDet.BinarySubDir, binaryName(binaryFilePrefix))
+ path = filepath.Join(info.fromDir, *info.bundleDet.BinarySubDir, binaryName(binaryFilePrefix))
} else {
- filepath, err = downloadBinary(dir, version, binaryFilePrefix, githubRepo)
+ path, err = downloadBinary(dir, version, binaryFilePrefix, githubRepo)
if err != nil {
return fmt.Errorf("error downloading %s binary: %w", binaryFilePrefix, err)
}
}
- extractedFilePath, err := extractFile(filepath, dir, binaryFilePrefix)
+ extractedFilePath, err := extractFile(path, dir, binaryFilePrefix)
if err != nil {
return err
}
// remove downloaded archive from the default dapr bin path.
if !isAirGapInit {
- err = os.Remove(filepath)
+ err = os.Remove(path)
if err != nil {
return fmt.Errorf("failed to remove archive: %w", err)
}
@@ -911,8 +911,8 @@ func makeExecutable(filepath string) error {
// https://github.com/snyk/zip-slip-vulnerability, fixes gosec G305
func sanitizeExtractPath(destination string, filePath string) (string, error) {
- destpath := path_filepath.Join(destination, filePath)
- if !strings.HasPrefix(destpath, path_filepath.Clean(destination)+string(os.PathSeparator)) {
+ destpath := filepath.Join(destination, filePath)
+ if !strings.HasPrefix(destpath, filepath.Clean(destination)+string(os.PathSeparator)) {
return "", fmt.Errorf("%s: illegal file path", filePath)
}
return destpath, nil
@@ -961,7 +961,7 @@ func unzip(r *zip.Reader, targetDir string, binaryFilePrefix string) (string, er
continue
}
- if err = os.MkdirAll(path_filepath.Dir(fpath), os.ModePerm); err != nil {
+ if err = os.MkdirAll(filepath.Dir(fpath), os.ModePerm); err != nil {
return "", err
}
@@ -1052,14 +1052,14 @@ func untar(reader io.Reader, targetDir string, binaryFilePrefix string) (string,
return foundBinary, nil
}
-func moveFileToPath(filepath string, installLocation string) (string, error) {
- fileName := path_filepath.Base(filepath)
+func moveFileToPath(path string, installLocation string) (string, error) {
+ fileName := filepath.Base(path)
destFilePath := ""
destDir := installLocation
- destFilePath = path.Join(destDir, fileName)
+ destFilePath = filepath.Join(destDir, fileName)
- input, err := os.ReadFile(filepath)
+ input, err := os.ReadFile(path)
if err != nil {
return "", err
}
@@ -1131,7 +1131,7 @@ func createRedisStateStore(redisHost string, componentsPath string) error {
return err
}
- filePath := path_filepath.Join(componentsPath, stateStoreYamlFileName)
+ filePath := filepath.Join(componentsPath, stateStoreYamlFileName)
err = checkAndOverWriteFile(filePath, b)
return err
@@ -1162,7 +1162,7 @@ func createRedisPubSub(redisHost string, componentsPath string) error {
return err
}
- filePath := path_filepath.Join(componentsPath, pubSubYamlFileName)
+ filePath := filepath.Join(componentsPath, pubSubYamlFileName)
err = checkAndOverWriteFile(filePath, b)
return err
From 73a74d45972cf7acdc04c3ab4704ffcde652fe15 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 10:28:48 -0500
Subject: [PATCH 23/28] linting
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index 4e58187b7..63c3453c3 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -26,7 +26,6 @@ import (
"os"
"path"
"path/filepath"
- path_filepath "path/filepath"
"runtime"
"strings"
"sync"
@@ -704,14 +703,14 @@ func moveDashboardFiles(extractedFilePath string, dir string) (string, error) {
}
// Move binary from /release//web/dashboard(.exe) to /dashboard(.exe).
- err = os.Rename(extractedFilePath, filepath.Join(dir, path_filepath.Base(extractedFilePath)))
+ err = os.Rename(extractedFilePath, filepath.Join(dir, filepath.Base(extractedFilePath)))
if err != nil {
err = fmt.Errorf("error moving %s binary to path: %w", filepath.Base(extractedFilePath), err)
return "", err
}
// Change the extracted binary file path to reflect the move above.
- extractedFilePath = filepath.Join(dir, path_filepath.Base(extractedFilePath))
+ extractedFilePath = filepath.Join(dir, filepath.Base(extractedFilePath))
// Remove the now-empty 'release' directory.
err = os.RemoveAll(filepath.Join(dir, "release"))
From 3f79c26b4704a5eb499adabd5ec2fcbca12b6713 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 11:21:46 -0500
Subject: [PATCH 24/28] Make lock path absolute
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index 63c3453c3..bd2bcf910 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -642,9 +642,9 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
"-d",
"--entrypoint", "./scheduler",
}
- schedVolPath := filepath.Join("var", "lock")
+ schedVolPath := filepath.Join("/var", "lock")
if info.imageVariant == "mariner" && runtime.GOOS == daprWindowsOS {
- schedVolPath = filepath.Join("run", "lock")
+ schedVolPath = filepath.Join("/run", "lock")
}
if info.schedulerVolume != nil {
// Don't touch this file location unless things start breaking.
From 41b2a54b169253a76302a8d5cb198fce2c50b8f5 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 11:23:40 -0500
Subject: [PATCH 25/28] Remove runtime windows check for mariner
Signed-off-by: joshvanl
---
pkg/standalone/standalone.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go
index bd2bcf910..116c1dced 100644
--- a/pkg/standalone/standalone.go
+++ b/pkg/standalone/standalone.go
@@ -643,7 +643,7 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
"--entrypoint", "./scheduler",
}
schedVolPath := filepath.Join("/var", "lock")
- if info.imageVariant == "mariner" && runtime.GOOS == daprWindowsOS {
+ if info.imageVariant == "mariner" {
schedVolPath = filepath.Join("/run", "lock")
}
if info.schedulerVolume != nil {
From 9910c5c6571d5044f9f9d0b8a60ce23504748889 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 11:31:21 -0500
Subject: [PATCH 26/28] Fix image runtime version on suffix mariner
Signed-off-by: joshvanl
---
tests/e2e/standalone/init_test.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go
index b4f8e804c..0c185b411 100644
--- a/tests/e2e/standalone/init_test.go
+++ b/tests/e2e/standalone/init_test.go
@@ -267,7 +267,7 @@ func verifyContainers(t *testing.T, daprRuntimeVersion string) {
"dapr_redis": "",
}
- v, err := semver.NewVersion(daprRuntimeVersion)
+ v, err := semver.NewVersion(strings.TrimSuffix(daprRuntimeVersion, "-mariner"))
require.NoError(t, err)
if v.Major() >= 1 && v.Minor() >= 14 {
daprContainers["dapr_scheduler"] = daprRuntimeVersion
From 03d99b2c8446dcbbfeaaddb627d3d6e4ff845d5e Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 12:09:34 -0500
Subject: [PATCH 27/28] Print version..
Signed-off-by: joshvanl
---
tests/e2e/standalone/init_test.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go
index 0c185b411..52a88d9b4 100644
--- a/tests/e2e/standalone/init_test.go
+++ b/tests/e2e/standalone/init_test.go
@@ -287,6 +287,7 @@ func verifyContainers(t *testing.T, daprRuntimeVersion string) {
}
version := container.Image[versionIndex+1:]
if version != expectedVersion {
+ fmt.Printf(">>%s >>%s >>%s\n", name, version, expectedVersion)
continue
}
}
From fa652f96a54f45a2c915852f2023d059d443ef66 Mon Sep 17 00:00:00 2001
From: joshvanl
Date: Mon, 19 Aug 2024 17:04:10 -0500
Subject: [PATCH 28/28] Increase dapr dashboard to 0.14.0 in upgrade test
Signed-off-by: joshvanl
---
tests/e2e/upgrade/upgrade_test.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/e2e/upgrade/upgrade_test.go b/tests/e2e/upgrade/upgrade_test.go
index 8de45110e..cfe918450 100644
--- a/tests/e2e/upgrade/upgrade_test.go
+++ b/tests/e2e/upgrade/upgrade_test.go
@@ -34,7 +34,7 @@ var supportedUpgradePaths = []upgradePath{
// test upgrade on mariner images.
previous: common.VersionDetails{
RuntimeVersion: "1.13.0",
- DashboardVersion: "0.10.0",
+ DashboardVersion: "0.14.0",
ImageVariant: "mariner",
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"},
@@ -42,7 +42,7 @@ var supportedUpgradePaths = []upgradePath{
},
next: common.VersionDetails{
RuntimeVersion: "1.14.1",
- DashboardVersion: "0.10.0",
+ DashboardVersion: "0.14.0",
ImageVariant: "mariner",
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"},